Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Search

Real-World Tombstoning in Silverlight for Windows Phone, Part 2

AddThis Social Bookmark Button
In Part 1 of this series, we built a basic photo-extras application that allows a user to load photos from the phone’s Pictures library and convert the photos to grayscale. We also learned that in the absence of tombstoning support, the app doesn’t work very well. Specifically, if the user clicks the Start button to tombstone the app, followed by the Back button to reactivate it, the app loses its state. Any photo that has been loaded simply goes away. We can fix that by adding tombstoning support. We’ll follow Microsoft’s guidance and use the page’s OnNavigatedFrom
and OnNavigatedTo methods to house our tombstoning code. We’ll begin by adding an OnNavigatedFrom override that saves the current state of the app before tombstoning occurs. And we’ll modify the existing OnNavigatedTo method to restore that state when the app is reactivated. On the surface, it seems pretty simple. One question we have to address is where will the tombstoned state be stored? You have three options here: Store it in page state, which is a transient repository for page-scoped data accessed through the PhoneApplicationPage.State property Store it in application state,...(Read whole news on source site)

Home : Blog List : Jeff Prosise's Blog : Real-World Tombstoning in Silverlight for Windows Phone, Part 2