■ VirtualizingStackPanel 엘리먼트를 사용하는 방법을 보여준다.
▶ 예제 코드 (XAML)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<ListBox Width="200" Height="100"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel Orientation="Vertical" /> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBoxItem Content="one" /> <ListBoxItem Content="two" /> <ListBoxItem Content="three" /> <ListBoxItem Content="four" /> <ListBoxItem Content="five" /> <ListBoxItem Content="six" /> <ListBoxItem Content="seven" /> <ListBoxItem Content="eight" /> <ListBoxItem Content="nine" /> <ListBoxItem Content="ten" /> </ListBox> |