Saving Transient State

The Deactivated event provides an application with the opportunity to save its transient and persistent state.

Note

Saving the transient state of a PhoneApplicationPage should be performed in its OnNavigatedFrom method, as you see later in the chapter.

The goal is to enable restoration of the application to its prior state before being tombstoned. It should be assumed, however, that when the Deactivated event occurs, that the application is going to be closed, moving to the closed state. The user may, after all, opt not to resume the application, or may use the Start Experience to re-launch the application, rather than using the hardware Back button to return to the application. Moreover, if the user launches many other ...

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.