Saving username and password to a local store
In this recipe we will learn how to save a username and password to local storage settings.
Getting ready
For this recipe let's copy the simple MyTasks
app solution folder we built in Chapter 1, Data
Binding to UI Elements, and rename the folder to Ch2_Recipe3_MyTasks
. After you open the project, just press F5 and run it to make sure you don't get any errors.
How to do it...
Let's add another icon in the bottom navigation bar to link it to the Settings page. Then create the Settings page with the different controls to save the username and password.
First, add another bar item at the bottom to navigate to user settings page, which we will be creating in step 3:
<!--Sample code showing usage of ApplicationBar--> <phone:PhoneApplicationPage.ApplicationBar> <shell:ApplicationBar BackgroundColor="Orange" IsVisible="True" IsMenuEnabled="True"> <shell:ApplicationBarIconButton IconUri="/Images/appbar.folder.rest.png" Click="ButtonFolder_Click...