I have a problem with saving my app settings? I creating windows 10 universal app and I have Slider which value I want to save.
i use this code to save it:
private void musicVolume_ValueChanged(object sender, RangeBaseValueChangedEventArgs e)
{
ApplicationDataContainer AppSettings = ApplicationData.Current.LocalSettings;
AppSettings.Values["musicV"] = musicVolume.Value;
}
And in constuctor of page I have this lines of code:
ApplicationDataContainer AppSettings = ApplicationData.Current.LocalSettings;
if (AppSettings.Values.ContainsKey("musicV"))
{
musicVolume.Value = Convert.ToDouble(AppSettings.Values["musicV"]);
}
It supposed to show new value when I go to that page, but it doesn't, it alway show last default one. Why it not working and how to make it work?
PS: sorry for my bad english...