I see the property Value in relation to NavigationService in Template 10. what is special about this property? How should it used? No doc on this topic and some one may help me explain?
Hmm. Okay, so I took the time to look into what you are asking about. I'm telling you, man, there just isn't a Value
property in the Template 10 Navigation Service. I've included a class diagram from the framework's source so show you.
If instead you mean the Suspension State Dictionary
passed to the OnNavigatedTo() and OnNavigatedFrom() methods implemented by INavigable
, which has a Value
property, this this is simply a property bag used by you to save values when you Suspend and to fetch values when you Restore. One important aside with this dictionary is that it is cleared when the user navigates to a page with the same type, and it is only persisted when your app is terminated while suspended. During normal Suspend/Resume, the fast-switching is automatic and though OnNavigatedFrom() is called, OnNavigatedTo() is never called. Your app is simply restored from memory automatically without needing your intervention. Should you need to intervene (music apps want this capability) the BootStrapper's OnResume override can catch this operation and call out to your view-model or music service.
I hope this helps.