I have two classes. First is using for store boolean value from ToggleSwitchButton by using IsolatedStorage.
Like this…
private void tglSwitch_Checked(object sender, RoutedEventArgs e)
{
System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings["EnableLocation"] = true;
}
private void tglSwitch_Unchecked(object sender, RoutedEventArgs e)
{
System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings["EnableLocation"] = false;
}
The second class will use the boolean value from the first class to do something.
Like this…
if(booleanValFromFirst){
//Do something
}
else{
//Do something
}
Thanks.
Is this, what you want?
P.S. I would recommend for you to create a single class for all values, stored in Application Settings and work with it.
Like this:
Then you can work with that class instance
Initialize it at your startup class as
SettingsManager.LoadSettings();an then in any class just call for it: