How to save local settings of login form using Applicationda

Sep 15 2015 1:37 PM
I designed two pages. One page consist of Login module and registration module using pivot control. Using sqlite database inserted values to data base. After login to the form when the user closes the application with out clicking logout on next app launch the same page should be redirected. The page page settings should be preserved and restored. I am trying to use Application data local settings in windows phone 8.1 apps but I cannot save the settings of the page.
 
Windows.Storage.ApplicationDataContainer data = Windows.Storage.ApplicationData.Current.LocalSettings;
public void logout_Click(object sender, RoutedEventArgs e)
{
data.Values["check"]=
this.Frame.Navigate(typeof(MainPage));
 
I think the above code is wrong. But how to save the settings and use them. Please help me 

Answers (1)