I was talking with my good buddy Sam Stokes today about a group of students he is working with who are having some trouble with
saving the state of their applications. He was looking for a way to show them an example on a single page, just to get the concept across. As we often do, we loaded up a screen sharing session and created a new project to build a sample out.
To start with, we wanted to be able to show that the state was being saved, so we dropped a couple of controls onto the page.
We added event handlers for the OnNavigatedTo, and OnNavigatedFrom events. When we navigate to the page, we'll check to see if anything was saved and load the values. When we navigate away, we'll save everything to IsolatedStorage.
If you want to take a look at the project in action, you can download the source code.
After we got the project up and going, I was inspired to build another project that shows how to use the application events to support Fast Application Switching. I'll post more on that next.