Image Caching
While the viewmodel saves the result of the WCF service call, which allows the app to restore its state after being tombstoned, downloaded images are not saved in the state dictionary, but rather, the app relies on some custom image caching.
A custom IValueConverter
, called ImageCacheConverter
, is used to download the image from the specified image URI, as shown in the following excerpt:
<Image Source="{Binding Product.LargeImageUri, Converter={StaticResource ImageCacheConverter}}" />
By using the ImageCacheConverter
, images can be downloaded once and stored in isolated storage for an arbitrary period. When that period has elapsed, the image is downloaded again. This allows the application to ...
Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.