Testing.ItemDetailPage.SaveState C# (CSharp) Method

SaveState() protected method

Preserves state associated with this page in case the application is suspended or the page is discarded from the navigation cache. Values must conform to the serialization requirements of SuspensionManager.SessionState.
protected SaveState ( Object>.Dictionary pageState ) : void
pageState Object>.Dictionary An empty dictionary to be populated with serializable state.
return void
        protected override void SaveState(Dictionary<String, Object> pageState)
        {
            var selectedItem = (SampleDataItem)this.flipView.SelectedItem;
            pageState["SelectedItem"] = selectedItem.UniqueId;
        }