#612 – Application Event Sequence for Page-Based Applications
July 27, 2012 1 Comment
When you create a page-based application in WPF, you use a NavigationWindow as the main window, which in turn hosts one or more Page objects. (If you set the StartupUri property of the Application to point to a Page, a NavigationWindow will be created automatically).
The sequence of Application events that fire for a page-based application are listed below.
When you start the application (assuming that a Page is specified as the StartupUri):
- Startup
- Navigating
- Navigated
- LoadCompleted
- Activated
When you shut the application down normally:
- Deactivated
- Exit
When you navigate to a new Page:
- Navigating
- NavigationProgress (1 or more times)
- Navigated
- LoadCompleted
User is logging out of or shutting down Windows:
- Deactivated
- SessionEnding
Application gains focus:
- Activated
Application loses focus:
- Deactivated