Windows8应用开发2 保存读取本地应用程序设置
1、存入本地应用程序设置:
1 ApplicationDataContainer myContainer = ApplicationData.Current.LocalSettings; 2 myContainer.Values["key1"] = obj; //object对象
2、在启动程序时读取:
1 ApplicationDataContainer myContainer = ApplicationData.Current.LocalSettings; 2 if (myContainer.Values.ContainsKey("key1")) 3 { 4 object obj= myContainer.Values["key1"]; 5 }