,

Summary

Maintaining the appearance of continuity after an application has been tombstoned is one of the key challenges facing Windows Phone developers.

There are two types of application state: persistent and transient. Persistent state exists across application launches and is saved using your app’s private storage area. Transient state is discarded when an application is closed and is stored in the Microsoft.Phone.Shell.PhoneApplicationService.State dictionary.

Transient page state should be stored when the Page.OnNavigatedFrom method is called and restored when the OnNavigatedTo method is called. Transient application state can be stored when the PhoneApplicationService.Deactivated event occurs and restored when the PhoneApplicationService.Activated event occurs.

Persistent state should be saved when transient state is saved and also when the application is closing using the PhoneApplicationService.Closing event.

In this chapter you saw an overview of the application execution model and examined the various application life cycle events, which are used to coordinate state persistence and restoration.

The chapter then explored the new Windows Phone 8 feature, Fast App Resume, which promises to improve startup performance for dormant apps that are relaunched.

The chapter then looked at how to enable an app to run under the lock screen and then looked at page navigation and how to optimize the user experience by using a splash screen or a loading indicator.

Finally, the chapter delved into the sample application and discussed image caching, design-time data, and consuming a simple WCF service.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.246.47