如何让A页面跳转B页面之后缓存A的状态,当从B返回A页面之后直接显示缓存的状态,而不用重新初始化页面.
我在跳转的时候采用的是Frame.Navigate
Page.NavigationCacheMode property: http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.ui.xaml.controls.page.navigationcachemode
设置A的 NavigationCacheMode="Required"或者"Enabled",
http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.ui.xaml.navigation.navigationcachemode
Required :The page is cached and the cached instance is reused for every visit regardless of the cache size for the frame. Enabled : The page is cached, but the cached instance is discarded when the size of the cache for the frame is exceeded.
Bob Bao [MSFT] MSDN Community Support | Feedback to us