WinRT/UWP Frame and Page caching: How to create new page instance on Navigate() and keep the page instance on GoBack()

后端 未结 7 2122
长发绾君心
长发绾君心 2020-11-29 21:23

I\'m trying to create an UWP (Universal Windows App) application with C#. My problem is the Frame control: If I use it without NavigationCacheMode = Requi

7条回答
  •  半阙折子戏
    2020-11-29 22:14

    When NavigationCacheMode is enabled, you can call Dispose() (conditionally) in OnNavigatedFrom() to make sure that a new instance of the page will be created the next time the application navigates to it.

提交回复
热议问题