title: Random access data virtualization for ListView on Windows Runtime
body: <p>I'm implementing a list that could easily have 10,000 small pictures in it.  Actual use case is showing a list of thumbnails of a video so you can scroll thru a video frame by frame.  I put in a thumbnail of the video into the list every 2/3rds of a second in the video.  I need to support very long videos (e.g. 1hr video). </p>
  
  <p>So virtualization options:</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh780657.aspx">http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh780657.aspx</a></p>
  
  <p>I tried "Incremental data virtualization" and that consumes too much memory for me because the images can only be referred to via streams and I'd end up opening 10,000 streams.  This would crash a windows phone application due to an out of memory.</p>
  
  <p>Now I'd like to try "Random access data virtualization".  I see how to implement the interfaces <code>IObservableVector&lt;object&gt;, INotifyCollectionChanged</code> (yes <code>&lt;object&gt;</code> b/c <code>&lt;T&gt;</code> doesn't work).  The tricky part is how I can dispose of images and load images.  Loading images is an Async method.</p>
  
  <p>Additionally I believe this solution should have placeholders just as the MSFT doc says "An example of this type of data virtualization is often seen in photo viewing apps. Instead of making the user wait to download all photos in an album, the app shows placeholder images. As each image is retrieved, the app replaces the placeholder element for that image with a rendering of the actual photo. Even though all of the images have not been downloaded and displayed, the user can still pan and interact with the collection."</p>
  
  <p>Looking at the MSFT sample for placeholders - using "ContainerContentChanging" seems like an important path.  I'm guessing here that there is a way to dispose of the image within this event, and start the load of an image as well.
  <a href="https://code.msdn.microsoft.com/windowsapps/ListViewSimple-d5fc27dd">https://code.msdn.microsoft.com/windowsapps/ListViewSimple-d5fc27dd</a>  </p>
  
  <p>Boiling this down to a question - <strong>Where is it possible to dispose of the image stream and start the load of an image for a random access virtualization list?</strong>  This is a very common scenario in photo apps and is super easy to do in iOS, but seems no one has done it on windows runtime yet. </p>