I have a c# metro app that downloads a collection of objects that have a property for a uri. This collection is bound to a ListBox with an Image source bound, this works fine.
When the app is tombstoning, I want to preserve all app state including the collection and the images that have been downloaded from the internet.
Covering the case, the users actions result in the collection being downloaded and displaying correctly they switch away to another app and the my app is terminated. The user then switches back to my app and expects exactly the same display as before but are now not connected to the internet.
Saving the collection is easy, and hooking into the ImageLoaded event on the Image is easy but how can I then save that image?
Is this required functionality, will windows automatically cache this type of http based image ?
Beware, the API has changed for RP and the commonly found examples using WritableBitmap no longer work as the constructor can no longer accept an ImageSource.
Update:
Metro APP - BitmapImage to Byte[] or Download Image from Web and convert it to a Byte[] Array that's what I was afraid of, those do not use the existing working bound image element but make a separate http call. I really do not want to download all my images twice. I will try a spike and see if windows caches the http request in this scenario.