我有一个列表框中嵌套了另一个列表框,当我试图减小窗口的高度时,内部列表框的滚动条不会出现。我希望在外部列表框上显示滚动条,因为外部列表框可能有多个内部列表框。
这是我使用的XAML。有人能告诉我问题出在哪里吗?
<ListBox Name="MasterListBox" HorizontalAlignment="Stretch" Width="200">
<ListBoxItem >
<ListBox Name="Child1" BorderBrush="{x:Null}">
<ListBoxItem Content="testing item1" />
<ListBoxItem Content="testing item2" />
<ListBoxItem Content="testing item3" />
<ListBoxItem Content="testing item1" />
<ListBoxItem Content="testing item2" />
<ListBoxItem Content="testing item3" />
<ListBoxItem Content="testing item1" />
<ListBoxItem Content="testing item2" />
<ListBoxItem Content="testing item3" />
<ListBoxItem Content="testing item1" />
<ListBoxItem Content="testing item2" />
<ListBoxItem Content="testing item3" />
<ListBoxItem Content="testing item1" />
<ListBoxItem Content="testing item2" />
<ListBoxItem Content="testing item3" />
<ListBoxItem Content="testing item1" />
<ListBoxItem Content="testing item2" />
<ListBoxItem Content="testing item3" />
</ListBox>
</ListBoxItem>
</ListBox>