I implemented data virtualization on a listbox with a WrapPanel (right now I'm using Telerik VirtualizingWrapPanel), I have a list of objects as ItemsSource, the list exists all the time but when an object is in the view I retrieve it's image(and all the images of the current page) and show it, when an item is not in the view I remove the image, to reduce memory usage.
On the list implementation I have:
object IList.this[int index]
{
get {
RetrievePageOf(index);
return this[index];
}
}
With telerik VirtualizingWrapPanel I have the following problems:
1. when I'm selecting object X and using shift + down arrow I see that the list is trying to retrieve all objects from 0 to X even when it is showing only 12 items at that time.
2. when using Ctrl +A (to select all objects) I don't want the list to retrieve all objects but only the ones that currently on the view.
Can you please advise what can I do to retrieve only the items that in the view?
Maybe you can recommend on a different WrapPanel that solves these problems.
Thanks.