windows-store-appsvirtualizingstackpanel

VirtualizingStackPanel Loses images when scrolled off screen


I have a GridView that has a VirtualizingStackPanel as the ItemsPanel. The items are bound to a collection of my model objects on my viewModel. The specific properties that I am binding to in the itemtemplate are an image and three strings. When the app starts every thing works as expected. However when I scroll the items off screen and back the image disappears. The strings continue to behave as expected. If I change the ItemsPanel to a stack panel I do not have this issues so I am pretty sure that it has to do with the virtualizingstackpanel. I just have no idea where to start to debug the issue.

Any responses are much appreciated.

Thanks, James


Solution

  • As noted in the comments by Nate Diamond, I needed to add a call to streamVariable.Seek(0) in order to make it work.