How to reload data into image listbox itemtemplate? Takes to long
I have three Buttons options that retrieve data from db and sets datacontext to ListBox, since I added an image to th开发者_如何学Ce ListBox ItemTemplate each time I click a different menu option, takes way to long to refresh items. Images are between 15KB and 45KB, and loaded locally. Already tried, VirtualizingStackpanel="Recycling" didn't work, maybe I missed something.
How many items are there in your listbox ? Do you have any grouping in your listbox ?
If not then you may have to look at the datavirtualizaton in wpf.Please check the links below for more
http://bea.stollnitz.com/blog/?p=338
http://social.msdn.microsoft.com/Forums/en/wpf/thread/98090161-0abf-4799-bbcb-852dcc0f0608
Did you change the default ItemsPanel to a VirtualizingStackPanel?
精彩评论