Launching event |
The Launching event is raised when a new application instance is launched by the user from the installed applications list or from a tile on Start in addition to other means, such as tapping on a toast notification associated with an application or selecting an application from an Extras menu. Execute very little code. Do not do resource intensive operations like accessing isolated storage. |
OnNavigatedTo method |
Is called when the user navigates to a page. Check if the page is a new instance. If not, the state is automatically intact. Otherwise, if there is data in State, use it to restore UI. |
Deactivated Event |
Is raised when the user navigates forward, away from your application, by pressing the Start button or by launching another application. Save application state to State in case the application is tombstoned. Also save persistent state to Isolated Storage in case the application is terminated. Do not destroy the application state in memory in case the application is made dormant. |
Dormant |
When the user navigates forward, away from an application, after the Deactivated event is raised, the operating system will attempt to put the application into a dormant state. In this state, all of the application's threads are stopped and no processing takes place, but the application remains intact in memory. If the application is reactivated from this state, the application does not need to recreate any state, because it has been preserved. |
Tombstoned |
A tombstoned application has been terminated, but information about its navigation state and state dictionaries populated by the application during Deactivated are preserved. The device will maintain tombstoning information for up to five applications at a time. If an application is tombstoned and the user navigates back to the application, it will be relaunched and the application can use the preserved data to restore state. Otherwise, the application is simply terminated. |
Activated event |
The Activated event is called when the user returns to a dormant or tombstoned application. Check IsApplicationInstancePreserved. If true, do nothing. If false, use data in State to restore application state. |
OnNavigatedFrom method |
Is called whenever the user navigates away from an application page. If not a backwards navigation, save UI state to State dictionary. |
Closing event |
Save persistent application data to isolated storage. |