【发布时间】:2011-11-30 18:24:54
【问题描述】:
我在列表框中有一个列表框,当我尝试降低窗口的高度时,列表框的滚动条不会出现。我想在外部列表框上显示滚动条,因为外部列表框可以有多个内部列表框。 这是我正在使用的 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>
【问题讨论】:
标签: c# wpf xaml listbox scroll