コード例 #1
0
        public override bool SaveToLocal(string key, string value)
        {
            ApplicationDataCompositeValue composite =
                ApplicationData.Current.LocalSettings.Values[COMPOSITE_SETTING] as ApplicationDataCompositeValue ??
                new ApplicationDataCompositeValue();

            if (composite.Any(p => p.Key == key))
            {
                composite.Remove(key);
            }
            composite.Add(key, value);

            ApplicationData.Current.LocalSettings.Values[COMPOSITE_SETTING] = composite;

            return(true);
        }