Example #1
0
        public void OnNavigatedFrom(MtNavigationEventArgs e)
        {
            var frameState = MtSuspensionManager.SessionStateForFrame(_page.Frame);
            var pageState = new Dictionary<String, Object>();
            var args = new MtSaveStateEventArgs(pageState);

            var copy = SaveState;
            if (copy != null)
                copy(this, args);

            _page.SaveState(pageState);
            _page.OnSaveState(args);
            frameState[PageKey] = pageState;
        }
Example #2
0
        public void OnNavigatedFrom(MtNavigationEventArgs e)
        {
            var frameState = MtSuspensionManager.SessionStateForFrame(_page.Frame);
            var pageState  = new Dictionary <String, Object>();
            var args       = new MtSaveStateEventArgs(pageState);

            var copy = SaveState;

            if (copy != null)
            {
                copy(this, args);
            }

            _page.SaveState(pageState);
            _page.OnSaveState(args);
            frameState[PageKey] = pageState;
        }
Example #3
0
 /// <summary>Used to save the state when the page gets suspended. </summary>
 /// <param name="pageState">The dictionary to save the page state into. </param>
 public void OnSaveState(MtSaveStateEventArgs pageState)
 {
     // TODO: Save the view model state.
 }
Example #4
0
 protected override void OnSaveState(MtSaveStateEventArgs pageState)
 {
     pageState.Set("Filter", Model.Filter);
 }
Example #5
0
 protected override void OnSaveState(MtSaveStateEventArgs pageState)
 {
     pageState.Set("MyTextBox", MyTextBox.Text);
 }
Example #6
0
 /// <summary>Used to save the state when the page gets suspended. </summary>
 /// <param name="pageState">The dictionary to save the page state into. </param>
 protected internal virtual void OnSaveState(MtSaveStateEventArgs pageState)
 {
     // Must be empty
 }
Example #7
0
 protected override void OnSaveState(MtSaveStateEventArgs pageState)
 {
     pageState.Set("MyTextBox", MyTextBox.Text);
 }
Example #8
0
 /// <summary>Used to save the state when the page gets suspended. </summary>
 /// <param name="pageState">The dictionary to save the page state into. </param>
 public void OnSaveState(MtSaveStateEventArgs pageState)
 {
     // TODO: Save the view model state. 
 }
 /// <summary>Used to save the state when the page gets suspended. </summary>
 /// <param name="pageState">The dictionary to save the page state into. </param>
 public void OnSaveState(MtSaveStateEventArgs pageState)
 {
     pageState.Set("SampleProperty", SampleProperty);
 }
Example #10
0
 protected override void OnSaveState(MtSaveStateEventArgs pageState)
 {
     pageState.Set("Filter", Model.Filter);
 }
 /// <summary>Used to save the state when the page gets suspended. </summary>
 /// <param name="pageState">The dictionary to save the page state into. </param>
 public void OnSaveState(MtSaveStateEventArgs pageState)
 {
     pageState.Set("SampleProperty", SampleProperty);
 }