开发者

How to reload data into image listbox itemtemplate? Takes to long

开发者 https://www.devze.com 2023-01-30 13:14 出处:网络
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, tak

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消