Download presentation
Presentation is loading. Please wait.
Published byθάλασσα Βαρουξής Modified over 5 years ago
1
04 | State Management Bill Burrows | UW Faculty Member & VB MVP
Anthony D. Green | Program Manager, Microsoft
2
Module Overview Application Life Cycle Saving/Restoring State
AW State Management
3
Application Life Cycle
4
Application Lifecycle
Running Not Running Suspended Suspending Resuming Activated
5
Application Lifecycle
Running Not Running Suspended Suspending Resuming Activated Suspended When User switches away from it Windows enters low-power state May stay in memory Resumes very fast Windows manages – no code required (unless page is discarded from navigation path)
6
Application Lifecycle
Running Not Running Suspended Suspending Resuming Activated Terminated (not running) When Application is suspended (and) Windows needs memory (or) Windows wants to save power Removed from memory Must be re-activated
7
Application Lifecycle
Big Deal! Windows notifies your app when it suspends it, but doesn't provide additional notification when it terminates the app. That means your app must handle the suspended event and use it to save its state and release its exclusive resources and file handles immediately.
8
Application Lifecycle
Running Not Running Suspended Suspending Resuming Activated Use the SuspensionManager
9
Suspending – Time Limited
About 5 seconds! Save changes in state frequently while app is running to reduce activity when suspension takes place.
10
Types of States Application State: Deals with the entire application. An example is preferences. Page State: Deals with a specific page. Includes things like user-entered text, selected element in a list, etc.
11
Saving/Restoring State
12
Managing State
13
AW State Management
14
AW State Management
15
Module 4 Review Application Life Cycle Saving/Restoring State
AW State Management
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.