ListBox + WrapPanel을 사용하여 ListBox ItemsPanelTemplate 내의 WPF에 정보를 표시 할 때 성능이 매우 떨어집니다.ListBox 및 WrapPanel 성능 저하
ListBox에서 WrapPanel을 제거하면 정보에 약 5 초이 표시되어 WrapPanel에 완전히 표시되고 약 1.10 분이 소요됩니다.
성능 향상 방법에 대한 정보는 무엇입니까?
구성 : 내 DataTemplate은 App.xaml에 있으며 1 개의 테두리, Grid, 20 개의 TextBlocks를 6 개의 다른 VirtualizingStackPanels에 래핑합니다.
목록 상자 :
<ListBox Name="myListBox"
Margin="4"
BorderBrush="DarkSlateGray" BorderThickness="1"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ItemsSource="{Binding propList}"
ItemTemplate="{StaticResource myDataTemplate}" >
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
당신을 감사드립니다.
[this] (http://stackoverflow.com/q/9946811/1997232)를 참조하십시오. – Sinatr