Application Event | Occurs When | Your Actions |
Application_Launching | The user taps the entry for an application on the installed applications screen, and a new instance of an application is created. | Do not read application settings from the isolated storage as that will slow down the loading process; do not attempt to restore transient state. When an application launches, it should always appear as a new instance. |
Application_Activated | For this event to occur, two conditions must be met: (1) the user navigates away from your application, either by using a launcher or a chooser, or by starting another application and (2) the user then comes back to your application by either completing the launcher or chooser or using the hardware Back button. This event is not raised when an application is first launched. | The application should allow the user to continue interaction as if she had never left the application; transient state information should be restored, but the application should not attempt to read the contents of the isolated storage to avoid potential slowdown. |
Application_Deactivated | The user navigates away from your application either by invoking a launcher or a chooser, or by launching another application. This event is not raised when your application is closing. | You should save all transient (i.e., related to the current application session) state into the State dictionary. You should save persistent state to an isolated storage. Applications are given ten seconds to complete this event; after ten seconds, if this event is still not completed, an application will be terminated and not tombstoned. |
Application_Closing | The user uses the Back key to navigate past the first page of your application. | Save all of the persistent state into the isolated storage.
|