February 2012
Intermediate to advanced
708 pages
22h 55m
English
When you navigate away from a view, by default, all references to the view are removed, and the view will be cleaned up the next time the garbage collector runs. However, this is not ideal if you need to retain the state of the view, such as when the user has entered unsaved data and is navigating away temporarily, or the view has been populated with data that would need to be retrieved again and repopulated.
You can, however, change this default behavior to cache the view and maintain its state by setting the NavigationCacheMode property on the view appropriately. NavigationCacheMode is a property of the Page class, which you can set in XAML. There are three options:
Disabled: This will result in the view being destroyed once ...Read now
Unlock full access