扩展器的列表框在Silverlight中无法正确折叠

时间:2011-05-27 20:44:29

标签: silverlight silverlight-toolkit expander

我在Silverlight中有一个扩展器列表框。它们会很好地膨胀,但是当它们坍塌时,包含膨胀机的堆叠板不会最小化。我在这里附上了截图。 enter image description here

 <Grid  Background="White">

            <StackPanel Orientation="Vertical" Margin="5,5,5,5" Grid.Column="0" MinWidth="700">
            <controls:Expander Expanded="Expander_Expanded" Name="expander1" Margin="5,0,0,5"  Header="{Binding Name}" HorizontalAlignment="Stretch" FontSize="15" FontFamily="Arial" FontWeight="Black" Height="Auto" >
                <StackPanel>
                    <ListBox   Height="Auto" Width="Auto" ItemsSource="{Binding ProductStreamCollection}" SelectionChanged="ListBox_SelectionChanged" MinWidth="700">
                        <ListBox.ItemContainerStyle>
                            <Style TargetType="ListBoxItem">
                                <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
                            </Style>
                        </ListBox.ItemContainerStyle>

                        <ListBox.ItemTemplate>

                            <DataTemplate>
                                <view:StreamView/>


                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </StackPanel>
            </controls:Expander>



        </StackPanel>

    </Grid>

0 个答案:

没有答案
相关问题