I want to store some basic information to prevent login each time for that I am using IsolatedStorageSettings but data is stored only till application is open how can I persist data even when application is closed and get back when application is started again. My code is as below to store information I uses
public static IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
settings.Add("user", MainPage.user);
to retrive it I use
if (MainPage.settings.Contains("user"))
{
MainPage.user = (User)MainPage.settings["user"];
}
here MainPage.user is a static object of class User in class MainPage.
You need to call the Save
method:
settings.Save();