I have a form (.NET 4.5 VS.2015) with a ListView that may contain a couple hundred even more than a thousand rows. Experiments show already that the form gets bogged down and unresponsive because it tries to load ALL ListViewItems when only about 20 are shown at any given time.
Therefore I implemented Virtual Mode on my ListView with a simple cache. I have set the VirtualListSize, enabled Virtual Mode and hooked up event handlers for both RetrieveItems and CacheVirtualItems events.
Now, as per the documentation you are made to believe CacheVirtualItems would be called prior to the RetrieveItems to allow your cache to be populated with the range of items the ListView intends to have in view.
But for what I see, CacheVirtualItems is never called before the first RetrieveItems! You would expect it to be called so that you can create your cache and prefill it (at least set capacity) and then fill appropriately on a cache miss.
Am I not understanding something well? If CacheVirtualItems is not called first to let your application prepare for the requests then what's the point?