コード例 #1
0
ファイル: MainPage.xaml.cs プロジェクト: fazed/WPMinor
 /// <summary>
 /// 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 <see cref="Common.SuspensionManager.SessionState"/>.
 /// </summary>
 /// <param name="sender">The source of the event; typically <see cref="Common.NavigationHelper"/></param>
 /// <param name="e">Event data that provides an empty dictionary to be populated with
 /// serializable state.</param>
 private void navigationHelper_SaveState(object sender, SaveStateEventArgs e)
 {
     e.PageState["greetingOutputText"] = greetingOutput.Text;
 }
コード例 #2
0
ファイル: PhotoPage.xaml.cs プロジェクト: fazed/WPMinor
 /// <summary>
 /// 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 <see cref="Common.SuspensionManager.SessionState"/>.
 /// </summary>
 /// <param name="sender">The source of the event; typically <see cref="Common.NavigationHelper"/></param>
 /// <param name="e">Event data that provides an empty dictionary to be populated with
 /// serializable state.</param>
 private void navigationHelper_SaveState(object sender, SaveStateEventArgs e)
 {
     if (!string.IsNullOrEmpty(mruToken))
     {
         e.PageState["mruToken"] = mruToken;
     }
 }