c# - 如何从IsolatedStorageSettings(WP8.0)迁移到ApplicationData(WP8.1运行时)

标签 c# windows-phone-8 windows-store-apps windows-phone-8.1

我有 Windows Phone 8.0 应用程序,它使用isolatedStorageSettings.ApplicationSettings 来存储设置等。现在我计划将此应用程序“更新”到 Windows Phone Store 8.1 应用程序并使用 ApplicationData.Current.RoamingSettings。

如何将已保存到isolatedStorageSettings.ApplicationSettings的应用设置迁移到ApplicationData.Current.RoamingSettings?

最佳答案

如果您要更新到 Silverlight 8.1 应用程序,IsolatedStorageSettings.ApplicationSettings 仍然有效。只需读出设置并将其复制到 ApplicationData.Current.RoamingSettings

如果您要更新到通用应用程序,讨论如下:Windows Phone 8 ApplicationSettings - Get settings in Universal app 。结果是您正在寻找 __Application Settings 文件,并且您需要反序列化它以获取设置。没有通用的解决方案,但如果您知道文件中的内容,那么这并不是那么难。

关于c# - 如何从IsolatedStorageSettings(WP8.0)迁移到ApplicationData(WP8.1运行时),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25182624/

相关文章:

c# - 捕获二维码时屏幕挂起

c# - 如何捕捉 "Unhandled win32 exception occured in AppName [procId]."

c# - Visual Studio 解决方案 (.sln) 文件是否对创建它们的机器有任何提示?

c# - 从列表框中清除选中的项目而不触发 itemcheck 事件

c# - Windows Phone 加速度计抖动

c# - WP8 : Local Storage or Isolated Storage to store data?

c# - Windows 应用商店应用程序中 XAML 网格中的图像重叠

c# - Windows 商店应用程序中的密码散列

c# - View 模型在数据绑定(bind)之外的作用?

c# - ASP.NET MVC - 将多个变量传递给模型?