【问题标题】:How to solve Page Caching bbin Windows Phone如何解决 Page Caching bbin Windows Phone
【发布时间】:2014-11-16 07:53:47
【问题描述】:

Windows Phone 中的第一页始终被缓存,这意味着当您运行应用程序然后按返回按钮关闭应用程序然后从手机或模拟器(而不是 Visual Studio)重新打开应用程序时,页面事件如没有调用构造函数、NavigationHelper_LoadState 和 OnNavigatedTo,即使我禁用了页面兑现

this.NavigationCacheMode = Windows.UI.Xaml.Navigation.NavigationCacheMode.Disabled;

在 App.xaml.cs 中

rootFrame.CacheSize = 0;

但仍被缓存。

如何解决这个问题,因为我需要从服务器获取数据并显示在页面中。

【问题讨论】:

    标签: c# xaml caching windows-phone-8 windows-store-apps


    【解决方案1】:

    您不能在 OnNavigatedTo 中加载数据吗?如果您需要在构造函数中加载数据,您也可以尝试从导航堆栈中删除页面。

    【讨论】:

      猜你喜欢
      • 2011-02-25
      • 1970-01-01
      • 2016-01-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-11
      • 1970-01-01
      相关资源
      最近更新 更多