win10的独立存储和win8的大致相同
Windows.Storage.ApplicationDataContainer roamingSettings = Windows.Storage.ApplicationData.Current.RoamingSettings; //如果不存在容器,就创建它 if (!roamingSettings.Containers.ContainsKey("SettingContainer")) { Windows.Storage.ApplicationDataContainer container = roamingSettings.CreateContainer("SettingContainer", Windows.Storage.ApplicationDataCreateDisposition.Always); if (container != null) container.Values["aaa"] = aaa; } else { //给键值对赋值 roamingSettings.Containers["SettingContainer"].Values["aaa"] ="aaa"; }