Expander的列表框无法在Silverlight中正确折叠。

| 我在Silverlight中有一个扩展器列表框。它们可以很好地膨胀,但是当它们塌陷时,包含膨胀器的堆叠面板不会最小化。我在这里附上了截图。
 <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>
    
已邀请:

要回复问题请先登录注册