3
プロパティに移動したボタンをクリックした後、戻るボタン(ハードウェア)をクリックすると、メインフォームとプロパティフォームの2つのフォームを持つアプリケーションがあります。私のアプリはメインフォームに戻りますが、プロパティを適用して再度メインページに移動して戻るボタンをもう一度押すと、プロパティに戻ります。プッシュバックを続けると、無限のプロパティ/メインページに戻ることができます。メインページがそのプロパティを変更したために悪いです。Windows Phoneのバックボタンの問題
Good cases:
MainPage ---> properties --back--> MainPage (No properties were set)
MainPage ---> properties --set--> newMainPage
MainPage ---> properties --set--> MainPage --back--> closeApp
Bad cases:
MainPage ---> properties --set--> MainPage --back--> properties --back--> oldMainPage
MainPage ---> properties --set--> newMainPage ---> properties --set--> new_newMainPage --back--> properties --back--> oldMainPage --back--> properties --back--> old_oldMainPage
ナビゲーションキャッシュを削除できますか?私はこれを試してみましたが、コンパイラは、それが読み取り専用だと言われます:
this.NavigationCacheMode = System.Windows.Navigation.NavigationCacheMode.Disabled;
私の現在のナビゲーションコード、それはです:
NavigationService.Navigate(new Uri("/Properties.xaml",UriKind.RelativeOrAbsolute));
and
NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.RelativeOrAbsolute));