views:

455

answers:

2

I use ListBox to show Images. However I found if the Listbox contain more than 1000 Image Items, It is really slow if I want to zoom the thumbnails. I asked the qestion in http://stackoverflow.com/questions/181845/in-a-wpf-listbox-with-more-than-1000-image-items-the-zoom-images-become-slow And tried lots of method, however I can't solve the problem by simply change the ListBox Property.

Can I write a fake ListBox? It seems contain lots of images, but actually it just contain about 100 images as its items, it can support smooth scrolling and when the 100 images are out of current window, it can load another 100 images while users do not know it(without pause when change page).

I have no idea how to write such a custom listbox, Anyone have a sample to do this trick? Thanks!

A: 

I have worked around a similar problem by doing one of:

  1. Provide a combo box to filter the list box. Very few people can efficiently find one thing in 300.
  2. Provide pagination on the list box. Put a label below that says "1 of x" and the standard back/forward button set.
Nick
+3  A: 

Read my response here. You need to implement a VirtualizingWrapPanel!

rudigrobler
Thank you very much, rudigrobler! I see.