7,655
社区成员
发帖
与我相关
我的任务
分享
void LoadSettings()
{
IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
Color clr;
if (settings.TryGetValue<Color>("backgroundColor", out clr))
BackgroundBrush = new SolidColorBrush(clr);
}
void SaveSettings()
{
IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
if (BackgroundBrush is SolidColorBrush)
{
settings["backgroundColor"] = (BackgroundBrush as SolidColorBrush).Color;
settings.Save();
}
}