我有一個listbox內的列表框,當我嘗試降低窗口的高度列表框的滾動條不出現。我想顯示外部列表框上的滾動條,因爲outerlistbox可以有多個innner列表框。 這裏是我正在使用的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>
如果我使用下面的URL中提到的樣式,它會給我一個編譯時錯誤,因爲內容演示者不支持直接內容 – andy