當我使用ListBox + WrapPanel在ListBox ItemsPanelTemplate中的WPF中顯示信息時,性能結果非常差。ListBox和WrapPanel性能下降
如果我從列表框中刪除WrapPanel信息大約需要5秒用WrapPanel完全顯示它需要約1.10分鐘。
關於如何提高性能的任何提示?
配置爲: 我的DataTemplate位於App.xaml中,並使用1個Border,Grid和20個TextBlocks封裝在6個不同的VirtualizingStackPanel內。
列表框:
<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>
謝謝。
請參閱[本](http://stackoverflow.com/q/9946811/1997232)。 – Sinatr