WPF ListBox Binding Performance issue
I have a ListBox
which has a DataTemplate
applied to the items. Each item is to display 3 text fields. The ListBox
is bound to an ObservableCollection
. Everything is working fine, but when I try to load more than ~100 items into the c开发者_如何学Collection, it starts chewing up all my CPU and takes ages to load.
Any suggestions?
try using VirtualizingStackPanel
Please refer this document may that can help you http://blogs.msdn.com/b/vinsibal/archive/2008/05/14/recycling-that-item-container.aspx
精彩评论