Skip to content

Useful Isolated Storage Tips #2

May 6, 2011

Something I found really useful is Isolated Storage Settings, great for placing settings for an application imposed by the user. This uses IsolatedStorageSettings.ApplicationSettings.Application.

For things like checkboxes or togglebars this is useful to associate its value to the ApplicationSettings variable, but in this simple case I am using a button to apply a value to a name text into IsolatedStorageSettings.ApplicationSettings.

See the code below: –

IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;

settings.Add(“alarm”, “daily”);

settings.Save();

————————————————————————————————

As you can see I have applied the text name alarm set to the value daily, if for instance this is a toggle bar slider that has values daily and off, you can apply this toggle bar slider with the code above as an example.

————————————————————————————————

You can easily remove the alarm variable off IsolatedStorageSettings.ApplicationSettings with the code below: –

IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;

settings.Remove(“alarm”);

settings.Save();

Hope that helps!

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: