{"id":643,"date":"2011-03-09T03:08:00","date_gmt":"2011-03-09T03:08:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vbteam\/2011\/03\/09\/visual-basic-windows-phone-7-series-8-how-to-create-a-settings-page-for-windows-phone-7\/"},"modified":"2024-07-05T12:40:17","modified_gmt":"2024-07-05T19:40:17","slug":"visual-basic-windows-phone-7-series-8-how-to-create-a-settings-page-for-windows-phone-7","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/vbteam\/visual-basic-windows-phone-7-series-8-how-to-create-a-settings-page-for-windows-phone-7\/","title":{"rendered":"Visual Basic Windows Phone 7 Series #8. How to create a settings page for Windows Phone 7"},"content":{"rendered":"<p><span style=\"font-size: small\">I have experienced lot of fun creating Windows Phone 7 applications in Visual Basic and writing about them here. In our <\/span><a href=\"http:\/\/blogs.msdn.com\/b\/vbteam\/archive\/2011\/03\/07\/visual-basic-windows-phone-7-series-how-to-create-a-bing-maps-application-for-windows-phone-7.aspx\"><span style=\"font-size: small\">last post<\/span><\/a><span style=\"font-size: small\">, I explained how to create a Bing Maps application for Windows Phone 7. In this blog, I want to share a sample that will help you to create a settings page for Windows Phone 7. This application will display two setting pages &#8211; one where the setting changes will be updated immediately, and the other where the user will have to confirm the changes. <\/span><\/p>\n<p><span style=\"font-size: small\">I will now demonstrate how easy it is to create a settings page for Windows Phone 7, using Visual Basic for Windows Phone Developer Tools. The settings page can be created in 6 simple steps as follows:<\/span><\/p>\n<ol>\n<li><span style=\"font-size: small\">Create a sample application and add controls <\/span><\/li>\n<li><span style=\"font-size: small\">Create a settings class <\/span><\/li>\n<li><span style=\"font-size: small\">Create a settings page that does not require a confirmation button <\/span><\/li>\n<li><span style=\"font-size: small\">Create a settings page that requires a confirmation button <\/span><\/li>\n<li><span style=\"font-size: small\">Build and debug the application <\/span><\/li>\n<li><span style=\"font-size: small\">Rebuild in the release mode before publishing <\/span><\/li>\n<\/ol>\n<p><i><span style=\"font-size: small\">Prerequisites:<\/span><\/i><\/p>\n<ul>\n<\/ul>\n<ul>\n<\/ul>\n<ul>\n<\/ul>\n<ul>\n<li><span style=\"font-size: small\"><i>Visual Studio 2010 Professional, Premium,\nor Ultimate. If you do not have any of the releases, you can download any of\nthe following trial versions as per your preference: <\/i><a href=\"http:\/\/www.microsoft.com\/downloads\/en\/details.aspx?FamilyID=26bae65f-b0df-4081-ae6e-1d828993d4d0&amp;displaylang=en\"><i>Professional<\/i><\/a><i>, <\/i><a href=\"http:\/\/www.microsoft.com\/downloads\/en\/details.aspx?FamilyID=7038e207-329c-4006-b620-16d1af1c42c1&amp;displaylang=en\"><i>Premium<\/i><\/a><i>, or <\/i><a href=\"http:\/\/www.microsoft.com\/downloads\/en\/details.aspx?FamilyID=e2a1a098-995e-4468-816d-7fdbe0a64f38&amp;displaylang=en\"><i>Ultimate<\/i><\/a><i>.<\/i><\/span><\/li>\n<li><span style=\"font-size: small\"><a href=\"http:\/\/www.microsoft.com\/downloads\/en\/details.aspx?FamilyID=04704acf-a63a-4f97-952c-8b51b34b00ce&amp;displaylang=en\"><i>Windows Phone Developer Tools\nRTW<\/i><\/a><\/span><\/li>\n<li><span style=\"font-size: small\"><a href=\"http:\/\/www.microsoft.com\/downloads\/en\/details.aspx?FamilyID=4e97ea70-e479-4c05-814f-639d71690e5d&amp;displaylang=en\"><i>Visual Basic\nfor Windows Phone Developer Tools &#8211; RTW<\/i><\/a><em><br \/><\/em><\/span><span style=\"font-size: small\"><em>Note: You can install the newer version- <\/em><em><a href=\"http:\/\/www.microsoft.com\/downloads\/en\/details.aspx?FamilyID=77586864-ab15-40e1-bc38-713a95a56a05&amp;displaylang=en\">Windows Phone Developer Tools 7.1 Beta<\/a>\n instead of the above mentioned two tools as it will take comparatively\nless time. However, this sample was created using the previous version.<\/em><\/span><\/li>\n<\/ul>\n<ul>\n<\/ul>\n<ul>\n<\/ul>\n<p><span style=\"font-size: small\">To create a settings page for Windows Phone 7, let&rsquo;s follow the 6 simple steps mentioned earlier:<\/span><\/p>\n<h3>Step 1 &#8211; Create a sample application and add controls<\/h3>\n<h4>Create a sample application<\/h4>\n<ol>\n<li><span style=\"font-size: small\">Create a new project and browse to the &ldquo;Silverlight for Windows Phone&rdquo; node. <\/span><\/li>\n<li><span style=\"font-size: small\">Select the &ldquo;Windows Phone Application&rdquo; template. <\/span><\/li>\n<li><span style=\"font-size: small\">Enter a name for the application. <br \/><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/03\/6837.Sel_App.bmp\" border=\"0\" \/><\/span><\/li>\n<li><span style=\"font-size: small\">Click Ok. The MainPage.xaml page is displayed. <br \/><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/03\/2248.Init_Appl.bmp\" border=\"0\" \/><\/span><\/li>\n<\/ol>\n<h5><\/h5>\n<h4>Add controls<\/h4>\n<ol>\n<li><span style=\"font-size: small\">Click the MY APPLICATION text. In the Properties window, change the text property to &ldquo;Windows Phone 7 Sample&rdquo;. <\/span><\/li>\n<li><span style=\"font-size: small\">Click the page name text. In the Properties window, change the text property to &ldquo;Settings Sample&rdquo;. <\/span><\/li>\n<li><span style=\"font-size: small\">From the toolbox, drag and drop the TextBlock control to the design surface. <\/span><\/li>\n<li><span style=\"font-size: small\">Click the TextBlock control. In the Properties window, change the text property to &ldquo;This sample shows two Settings screens, one where the settings changes take effect immediately and one where the user has to confirm the changes. The settings are stored in Isolated Storage. You can navigate to the Settings screens using the menu item on the Application Bar below.&rdquo;. <\/span><\/li>\n<li><span style=\"font-size: small\">Open the MainPage.xaml.vb page. The page is displayed with the following code: \n<div id=\"codeSnippetWrapper\" style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 20px 0px 10px;width: 94.8%;font-family: 'Courier New', courier, monospace;direction: ltr;height: 110px;max-height: 200px;font-size: 8pt;overflow: auto;cursor: text;border: silver 1px solid;padding: 4px\">\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">Partial<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"> <span style=\"color: blue\">Public<\/span> <span style=\"color: blue\">Class<\/span> <span style=\"color: #2b91af\">MainPage<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Inherits<\/span> <span style=\"color: #2b91af\">PhoneApplicationPage<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green\">&#8216; Constructor<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span>Public<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"> <span style=\"color: blue\">Sub<\/span> <span style=\"color: blue\">New<\/span>()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>InitializeComponent()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Sub<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">End<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"> <span style=\"color: blue\">Class<\/span><\/span><\/p>\n<\/div>\n<p><\/span><\/li>\n<li><span style=\"font-size: small\">Replace the code in Step 5 with the following code: \n<div id=\"codeSnippetWrapper\" style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 20px 0px 10px;width: 94.95%;font-family: 'Courier New', courier, monospace;direction: ltr;height: 109px;max-height: 200px;font-size: 8pt;overflow: auto;cursor: text;border: silver 1px solid;padding: 4px\">\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">Partial<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"> <span style=\"color: blue\">Public<\/span> <span style=\"color: blue\">Class<\/span> <span style=\"color: #2b91af\">MainPage<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Inherits<\/span> <span style=\"color: #2b91af\">PhoneApplicationPage<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green\">&#8216; Constructor<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Public<\/span> <span style=\"color: blue\">Sub<\/span> <span style=\"color: blue\">New<\/span>()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>InitializeComponent()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>SupportedOrientations = <span style=\"color: #2b91af\">SupportedPageOrientation<\/span>.Portrait<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green\">&#8216; Add an Application Bar with a &#8216;setting menu item.<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ApplicationBar = <span style=\"color: blue\">New<\/span> <span style=\"color: #2b91af\">ApplicationBar<\/span>()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ApplicationBar.IsMenuEnabled = <span style=\"color: blue\">True<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ApplicationBar.IsVisible = <span style=\"color: blue\">True<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ApplicationBar.Opacity = 1.0<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Dim<\/span> settingsItem <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">New<\/span> <span style=\"color: #2b91af\">ApplicationBarMenuItem<\/span>(<span style=\"color: #a31515\">&#8220;settings&#8221;<\/span>)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">AddHandler<\/span> settingsItem.Click, <span style=\"color: blue\">AddressOf<\/span> settings_Click<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span>ApplicationBar.MenuItems.Add(settingsItem)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Sub<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> <span style=\"color: blue\">Sub<\/span> settings_Click(<span style=\"color: blue\">ByVal<\/span> sender <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">Object<\/span>, <span style=\"color: blue\">ByVal<\/span> e <span style=\"color: blue\">As<\/span> <span style=\"color: #2b91af\">EventArgs<\/span>)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Me<\/span>.NavigationService.Navigate(<span style=\"color: blue\">New<\/span> <span style=\"color: #2b91af\">Uri<\/span>(<span style=\"color: #a31515\">&#8220;\/SettingsWithoutConfirmation.xaml&#8221;<\/span>, <span style=\"color: #2b91af\">UriKind<\/span>.Relative))<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Sub<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">End<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"> <span style=\"color: blue\">Class<\/span><\/span><\/p>\n<\/div>\n<p><i>Note: This method creates an application bar containing a settings menu item. This menu item is required by the user to navigate to the settings page that does not require the confirmation button. <\/i><\/span><\/li>\n<\/ol>\n<h3>Step 2 &#8211; Create a settings class<\/h3>\n<p><span style=\"font-size: small\">Creating a settings class is one of the important tasks. This class is required to hold, save, and then load the settings from isolated storage. This class will contain a method to add or update a value to isolated storage. This method will also assign a default value if the setting has never been set earlier.<\/span><\/p>\n<ol>\n<li><span style=\"font-size: small\">In Solution Explorer, right-click the application name and add a class. The Add New Item dialog box is displayed. <\/span><\/li>\n<li><span style=\"font-size: small\">Enter the name as &ldquo;AppSettings.vb&rdquo;, and then click Add. The AppSettings.vb page is displayed. <\/span><\/li>\n<li><span style=\"font-size: small\">Replace the code with the following code: \n<div id=\"codeSnippetWrapper\" style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 20px 0px 10px;width: 94.95%;font-family: 'Courier New', courier, monospace;direction: ltr;height: 109px;max-height: 200px;font-size: 8pt;overflow: auto;cursor: text;border: silver 1px solid;padding: 4px\">\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">Imports<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"> System.IO.IsolatedStorage<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">Imports<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"> System.Diagnostics<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">Public<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"> <span style=\"color: blue\">Class<\/span> <span style=\"color: #2b91af\">AppSettings<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green\">&#8216; Our isolated storage settings<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> isolatedStore <span style=\"color: blue\">As<\/span> <span style=\"color: #2b91af\">IsolatedStorageSettings<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green\">&#8216; The isolated storage key names of our settings<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> <span style=\"color: blue\">Const<\/span> CheckBoxSettingKeyName <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">String<\/span> = <span style=\"color: #a31515\">&#8220;CheckBoxSetting&#8221;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> <span style=\"color: blue\">Const<\/span> ListBoxSettingKeyName <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">String<\/span> = <span style=\"color: #a31515\">&#8220;ListBoxSetting&#8221;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> <span style=\"color: blue\">Const<\/span> RadioButton1SettingKeyName <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">String<\/span> = <span style=\"color: #a31515\">&#8220;RadioButton1Setting&#8221;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> <span style=\"color: blue\">Const<\/span> RadioButton2SettingKeyName <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">String<\/span> = <span style=\"color: #a31515\">&#8220;RadioButton2Setting&#8221;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> <span style=\"color: blue\">Const<\/span> RadioButton3SettingKeyName <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">String<\/span> = <span style=\"color: #a31515\">&#8220;RadioButton3Setting&#8221;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> <span style=\"color: blue\">Const<\/span> UsernameSettingKeyName <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">String<\/span> = <span style=\"color: #a31515\">&#8220;UsernameSetting&#8221;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> <span style=\"color: blue\">Const<\/span> PasswordSettingKeyName <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">String<\/span> = <span style=\"color: #a31515\">&#8220;PasswordSetting&#8221;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green\">&#8216; The default value of our settings<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> <span style=\"color: blue\">Const<\/span> CheckBoxSettingDefault <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">Boolean<\/span> = <span style=\"color: blue\">True<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> <span style=\"color: blue\">Const<\/span> ListBoxSettingDefault <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">Integer<\/span> = 0<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> <span style=\"color: blue\">Const<\/span> RadioButton1SettingDefault <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">Boolean<\/span> = <span style=\"color: blue\">True<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> <span style=\"color: blue\">Const<\/span> RadioButton2SettingDefault <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">Boolean<\/span> = <span style=\"color: blue\">False<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> <span style=\"color: blue\">Const<\/span> RadioButton3SettingDefault <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">Boolean<\/span> = <span style=\"color: blue\">False<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> <span style=\"color: blue\">Const<\/span> UsernameSettingDefault <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">String<\/span> = <span style=\"color: #a31515\">&#8220;&#8221;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> <span style=\"color: blue\">Const<\/span> PasswordSettingDefault <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">String<\/span> = <span style=\"color: #a31515\">&#8220;&#8221;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green\">&#8221;&#8217; Constructor that gets the application settings.<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Public<\/span> <span style=\"color: blue\">Sub<\/span> <span style=\"color: blue\">New<\/span>()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Try<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green\">&#8216; Get the settings for this application.<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>isolatedStore = <span style=\"color: #2b91af\">IsolatedStorageSettings<\/span>.ApplicationSettings<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Catch<\/span> e <span style=\"color: blue\">As<\/span> <span style=\"color: #2b91af\">Exception<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: #2b91af\">Debug<\/span>.WriteLine(<span style=\"color: #a31515\">&#8220;Exception while using IsolatedStorageSettings: &#8220;<\/span> &amp; e.ToString())<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Try<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Sub<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green\">&#8221;&#8217; Update a setting value for our application. If the setting does not<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp; <\/span><span>&nbsp;<\/span><span style=\"color: green\">&#8221;&#8217; exist, then add the setting.<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Public<\/span> <span style=\"color: blue\">Function<\/span> AddOrUpdateValue(<span style=\"color: blue\">ByVal<\/span> Key <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">String<\/span>, <span style=\"color: blue\">ByVal<\/span> value <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">Object<\/span>) <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">Boolean<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Dim<\/span> valueChanged <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">Boolean<\/span> = <span style=\"color: blue\">False<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Try<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green\">&#8216; if new value is different, set the new value.<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">If<\/span> isolatedStore(Key) <span style=\"color: blue\">IsNot<\/span> value <span style=\"color: blue\">Then<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>isolatedStore(Key) = value<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>valueChanged = <span style=\"color: blue\">True<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">If<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Catch<\/span> e1 <span style=\"color: blue\">As<\/span> <span style=\"color: #2b91af\">KeyNotFoundException<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>isolatedStore.Add(Key, value)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>valueChanged = <span style=\"color: blue\">True<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Catch<\/span> e2 <span style=\"color: blue\">As<\/span> <span style=\"color: #2b91af\">ArgumentException<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>isolatedStore.Add(Key, value)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>valueChanged = <span style=\"color: blue\">True<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Catch<\/span> e <span style=\"color: blue\">As<\/span> <span style=\"color: #2b91af\">Exception<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: #2b91af\">Debug<\/span>.WriteLine(<span style=\"color: #a31515\">&#8220;Exception while using IsolatedStorageSettings: &#8220;<\/span> &amp; e.ToString())<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Try<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: blue\">Return<\/span> valueChanged<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Function<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: green;font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: green;font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: green;font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span>&#8221;&#8217; Get the current value of the setting, or if it is not found, set the <\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: green\">&#8221;&#8217; setting to the default setting.<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span>Public<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Function<\/span><span style=\"color: #000000\"> GetValueOrDefault(<\/span><span style=\"color: blue\">Of<\/span><span style=\"color: #000000\"> valueType)(<\/span><span style=\"color: blue\">ByVal<\/span><span style=\"color: #000000\"> Key <\/span><span style=\"color: blue\">As<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">String<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: blue\">ByVal<\/span><span style=\"color: #000000\"> defaultValue <\/span><span style=\"color: blue\">As<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #2b91af\">valueType<\/span><span style=\"color: #000000\">) <\/span><span style=\"color: blue\">As<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #2b91af\">valueType<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Dim<\/span><span style=\"color: #000000\"> value <\/span><span style=\"color: blue\">As<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #2b91af\">valueType<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Try<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span style=\"color: #000000\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>value = <\/span><span style=\"color: blue\">CType<\/span><span style=\"color: #000000\">(isolatedStore(Key), <\/span><span style=\"color: #2b91af\">valueType<\/span><span style=\"color: #000000\">)<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Catch<\/span><span style=\"color: #000000\"> e1 <\/span><span style=\"color: blue\">As<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #2b91af\">KeyNotFoundException<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span style=\"color: #000000\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>value = defaultValue<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Catch<\/span><span style=\"color: #000000\"> e2 <\/span><span style=\"color: blue\">As<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #2b91af\">ArgumentException<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span style=\"color: #000000\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>value = defaultValue<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">End<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Try<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Return<\/span><span style=\"color: #000000\"> value<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">End<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Function<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: green;font-size: 8.5pt\"><span>&nbsp;&nbsp; <\/span><\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span style=\"color: #000000\"><span>&nbsp;<\/span><\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: green;font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span>&#8221;&#8217; Save the settings.<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Public<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Sub<\/span><span style=\"color: #000000\"> Save()<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span style=\"color: #000000\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>isolatedStore.Save()<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">End<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Sub<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span style=\"color: #000000\">&nbsp;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: green\">&#8221;&#8217; Property to get and set a CheckBox Setting Key.<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Public<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Property<\/span><span style=\"color: #000000\"> CheckBoxSetting() <\/span><span style=\"color: blue\">As<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Boolean<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Get<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Return<\/span><span style=\"color: #000000\"> GetValueOrDefault(<\/span><span style=\"color: blue\">Of<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Boolean<\/span><span style=\"color: #000000\">)(CheckBoxSettingKeyName, CheckBoxSettingDefault)<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">End<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Get<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Set<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: blue\">ByVal<\/span><span style=\"color: #000000\"> value <\/span><span style=\"color: blue\">As<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Boolean<\/span><span style=\"color: #000000\">)<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span style=\"color: #000000\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>AddOrUpdateValue(CheckBoxSettingKeyName, value)<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span style=\"color: #000000\"><span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span>Save()<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">End<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Set<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">End<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Property<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span style=\"color: #000000\">&nbsp;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: green\">&#8221;&#8217; Property to get and set a ListBox Setting Key.<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Public<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Property<\/span><span style=\"color: #000000\"> ListBoxSetting() <\/span><span style=\"color: blue\">As<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Integer<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Get<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Return<\/span><span style=\"color: #000000\"> GetValueOrDefault(<\/span><span style=\"color: blue\">Of<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Integer<\/span><span style=\"color: #000000\">)(ListBoxSettingKeyName, ListBoxSettingDefault)<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">End<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Get<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Set<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: blue\">ByVal<\/span><span style=\"color: #000000\"> value <\/span><span style=\"color: blue\">As<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Integer<\/span><span style=\"color: #000000\">)<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span style=\"color: #000000\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>AddOrUpdateValue(ListBoxSettingKeyName, value)<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span style=\"color: #000000\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Save()<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">End<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Set<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">End<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Property<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span style=\"color: #000000\">&nbsp;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: green\">&#8221;&#8217; Property to get and set a RadioButton Setting Key.<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Public<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Property<\/span><span style=\"color: #000000\"> RadioButton1Setting() <\/span><span style=\"color: blue\">As<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Boolean<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Get<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Return<\/span><span style=\"color: #000000\"> GetValueOrDefault(<\/span><span style=\"color: blue\">Of<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Boolean<\/span><span style=\"color: #000000\">)(RadioButton1SettingKeyName, RadioButton1SettingDefault)<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">End<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Get<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">Set<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: blue\">ByVal<\/span><span style=\"color: #000000\"> value <\/span><span style=\"color: blue\">As<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Boolean<\/span><span style=\"color: #000000\">)<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span style=\"color: #000000\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>AddOrUpdateValue(RadioButton1SettingKeyName, value)<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span style=\"color: #000000\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Save()<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">End<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Set<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"color: blue\">End<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: blue\">Property<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span style=\"color: #000000\">&nbsp;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;<\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp; <\/span><span>&nbsp;<\/span><span>&nbsp;<\/span><span style=\"color: green\">&#8221;&#8217; Property to get and set a RadioButton Setting Key.<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Public<\/span> <span style=\"color: blue\">Property<\/span> RadioButton2Setting() <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">Boolean<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Get<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Return<\/span> GetValueOrDefault(<span style=\"color: blue\">Of<\/span> <span style=\"color: blue\">Boolean<\/span>)(RadioButton2SettingKeyName, RadioButton2SettingDefault)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Get<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Set<\/span>(<span style=\"color: blue\">ByVal<\/span> value <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">Boolean<\/span>)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>AddOrUpdateValue(RadioButton2SettingKeyName, value)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Save()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Set<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Property<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green\">&#8221;&#8217; Property to get and set a RadioButton Setting Key.<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Public<\/span> <span style=\"color: blue\">Property<\/span> RadioButton3Setting() <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">Boolean<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Get<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Return<\/span> GetValueOrDefault(<span style=\"color: blue\">Of<\/span> <span style=\"color: blue\">Boolean<\/span>)(RadioButton3SettingKeyName, RadioButton3SettingDefault)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Get<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Set<\/span>(<span style=\"color: blue\">ByVal<\/span> value <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">Boolean<\/span>)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>AddOrUpdateValue(RadioButton3SettingKeyName, value)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Save()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Set<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Property<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;<\/span><span style=\"color: green\">&#8221;&#8217; Property to get and set a Username Setting Key.<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Public<\/span> <span style=\"color: blue\">Property<\/span> UsernameSetting() <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">String<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Get<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Return<\/span> GetValueOrDefault(<span style=\"color: blue\">Of<\/span> <span style=\"color: blue\">String<\/span>)(UsernameSettingKeyName, UsernameSettingDefault)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Get<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Set<\/span>(<span style=\"color: blue\">ByVal<\/span> value <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">String<\/span>)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>AddOrUpdateValue(UsernameSettingKeyName, value)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Save()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Set<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Property<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green\">&#8221;&#8217; Property to get and set a Password Setting Key.<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Public<\/span> <span style=\"color: blue\">Property<\/span> PasswordSetting() <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">String<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Get<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Return<\/span> GetValueOrDefault(<span style=\"color: blue\">Of<\/span> <span style=\"color: blue\">String<\/span>)(PasswordSettingKeyName, PasswordSettingDefault)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Get<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Set<\/span>(<span style=\"color: blue\">ByVal<\/span> value <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">String<\/span>)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>AddOrUpdateValue(PasswordSettingKeyName, value)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Save()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Set<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Property<\/span><\/span><\/p>\n<p><span style=\"font-family: 'Courier New';color: green;font-size: 8.5pt\"><span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span><span style=\"color: #000000\"><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">End<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"> <span style=\"color: blue\">Class<\/span><\/span><\/p>\n<p><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n<p class=\"MsoNormal\">&nbsp;<\/p>\n<\/div>\n<p><\/span><\/li>\n<\/ol>\n<p><s><\/s><\/p>\n<h5><s><\/s><s><\/s><\/h5>\n<h5><s><\/s><s><\/s><\/h5>\n<h3>Step 3 &#8211; Create a settings page that does not require a confirmation button <\/h3>\n<ol>\n<li><span style=\"font-size: small\">In Solution Explorer, right-click the application name, and then add a new item. The Add New Item dialog box is displayed. <\/span><\/li>\n<li><span style=\"font-size: small\">Select the &ldquo;Silverlight for Windows Phone&rdquo; node, and then select the &ldquo;Windows Phone User Control&rdquo; template. <\/span><\/li>\n<li><span style=\"font-size: small\">Enter the name as &ldquo;SettingsWithoutConfirmation.xaml&rdquo;, and then click Add. The SettingsWithoutConfirmation.xaml page is displayed. <\/span><\/li>\n<li><span style=\"font-size: small\">Add the following XAML code in the namespace declaration: \n<div id=\"codeSnippetWrapper\" style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 20px 0px 10px;width: 94.95%;font-family: 'Courier New', courier, monospace;direction: ltr;height: 66px;max-height: 200px;font-size: 8pt;overflow: auto;cursor: text;border: silver 1px solid;padding: 4px\">\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\">xmlns<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">:<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\">phone<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone&#8221;<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\">xmlns<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">:<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\">shell<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone&#8221;<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\">xmlns<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">:<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\">local<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;clr-namespace:SettingsSample&#8221;<\/span><\/p>\n<\/div>\n<p><\/span><\/li>\n<li><span style=\"font-size: small\">To add a local resource, add the following XAML code before the &lt;Grid&gt; tag: \n<div id=\"codeSnippetWrapper\" style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 20px 0px 10px;width: 94.95%;font-family: 'Courier New', courier, monospace;direction: ltr;height: 52px;max-height: 200px;font-size: 8pt;overflow: auto;cursor: text;border: silver 1px solid;padding: 4px\">\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&lt;<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">phone<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">:<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">PhoneApplicationPage.Resources<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&gt;<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&lt;<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">local<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">:<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">AppSettings<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> x<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">:<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\">Key<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;appSettings&#8221;&gt;&lt;\/<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">local<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">:<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">AppSettings<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&gt;<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&lt;\/<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">phone<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">:<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">PhoneApplicationPage.Resources<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&gt;<\/span><\/p>\n<\/div>\n<p><\/span><\/li>\n<li><span style=\"font-size: small\">To create buttons, add the following XAML code in the &lt;Grid&gt; tag: \n<div id=\"codeSnippetWrapper\" style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 20px 0px 10px;width: 94.95%;font-family: 'Courier New', courier, monospace;direction: ltr;height: 109px;max-height: 200px;font-size: 8pt;overflow: auto;cursor: text;border: silver 1px solid;padding: 4px\">\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&lt;<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">CheckBox<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Content<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;CheckBox Setting&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Height<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Auto&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> HorizontalAlignment<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Left&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Margin<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;60,20,0,0&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Name<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;checkBoxSetting&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> VerticalAlignment<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Top&#8221;<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"> <span style=\"color: red\">IsChecked<\/span><span style=\"color: blue\">=&#8221;{<\/span><span style=\"color: #a31515\">Binding<\/span><span style=\"color: red\"> Source<\/span><span style=\"color: blue\">={<\/span><span style=\"color: #a31515\">StaticResource<\/span><span style=\"color: red\"> appSettings<\/span><span style=\"color: blue\">},<\/span><span style=\"color: red\"> Path<\/span><span style=\"color: blue\">=CheckBoxSetting,<\/span><span style=\"color: red\"> Mode<\/span><span style=\"color: blue\">=TwoWay}&#8221;<\/span> <span style=\"color: blue\"><span>&nbsp;<\/span>\/&gt;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&lt;<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">ListBox<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Height<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;140&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> HorizontalAlignment<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Left&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Margin<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;70,150,0,0&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Name<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;listBoxSetting&#8221;<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"> <span style=\"color: red\">VerticalAlignment<\/span><span style=\"color: blue\">=&#8221;Top&#8221;<\/span><span style=\"color: red\"> Width<\/span><span style=\"color: blue\">=&#8221;360&#8243;<\/span> <span style=\"color: red\"><span>&nbsp;<\/span>SelectedIndex<\/span><span style=\"color: blue\">=&#8221;{<\/span><span style=\"color: #a31515\">Binding<\/span><span style=\"color: red\"> Source<\/span><span style=\"color: blue\">={<\/span><span style=\"color: #a31515\">StaticResource<\/span><span style=\"color: red\"> appSettings<\/span><span style=\"color: blue\">},<\/span><span style=\"color: red\"> Path<\/span><span style=\"color: blue\">=ListBoxSetting,<\/span><span style=\"color: red\"> Mode<\/span><span style=\"color: blue\">=TwoWay}&#8221;&gt;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&lt;<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">ListBoxItem<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Content<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Times New Roman&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> FontSize<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;24&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> FontFamily<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Times New Roman&#8221; \/&gt;<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&lt;<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">ListBoxItem<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Content<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Arial&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> FontSize<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;24&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> FontFamily<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Arial&#8221; \/&gt;<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&lt;<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">ListBoxItem<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Content<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Comic Sans MS&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> FontSize<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;24&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> FontFamily<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Comic Sans MS&#8221; \/&gt;<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&lt;\/<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">ListBox<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&gt;<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&lt;<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">RadioButton<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Content<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Choice One&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Height<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Auto&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> HorizontalAlignment<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Left&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Margin<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;60,0,0,235&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Name<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;radioButton1&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> VerticalAlignment<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Bottom&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> GroupName<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;GroupOne&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> IsChecked<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;{<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">Binding<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Source<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">={<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">StaticResource<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> appSettings<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">},<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Path<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=RadioButton1Setting,<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Mode<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=TwoWay}&#8221; \/&gt;<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&lt;<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">RadioButton<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Content<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Choice Two&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Height<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Auto&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> HorizontalAlignment<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Left&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Margin<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;60,350,0,0&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Name<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;radioButton2&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> VerticalAlignment<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Top&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> GroupName<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;GroupOne&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> IsChecked<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;{<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">Binding<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Source<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">={<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">StaticResource<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> appSettings<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">},<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Path<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=RadioButton2Setting,<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Mode<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=TwoWay}&#8221;\/&gt;<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&lt;<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">RadioButton<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Content<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Choice Three&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Height<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Auto&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> HorizontalAlignment<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Left&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Margin<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;60,400,0,0&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Name<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;radioButton3&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> VerticalAlignment<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Top&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> GroupName<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;GroupOne&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> IsChecked<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;{<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">Binding<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Source<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">={<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">StaticResource<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> appSettings<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">},<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Path<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=RadioButton3Setting,<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Mode<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=TwoWay}&#8221;\/&gt;<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&lt;<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">Button<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Content<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Settings With Confirmation&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Height<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;80&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> HorizontalAlignment<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Left&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Margin<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;60,450,0,0&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Name<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;buttonAdditional&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Click<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;buttonAdditional_Click&#8221; \/&gt;<\/span><\/p>\n<\/div>\n<p><i>Note: This page uses data binding for the settings to be updated immediately and then saves the values to isolated storage. Selecting the binding mode as &ldquo;TwoWay&rdquo; updates the changes immediately. <\/i><\/span><\/li>\n<\/ol>\n<h3>Step 4 &#8211; Create a settings page that requires a confirmation button <\/h3>\n<ol>\n<li><span style=\"font-size: small\">In Solution Explorer, right-click the application name, and then add a new item. The Add New Item dialog box is displayed. <\/span><\/li>\n<li><span style=\"font-size: small\">Select the &ldquo;Silverlight for Windows Phone&rdquo; node, and then select the &ldquo;Windows Phone User Control&rdquo; template. <\/span><\/li>\n<li><span style=\"font-size: small\">Enter the name as &ldquo;SettingsWithConfirmation.xaml&rdquo;, and then click Add. The SettingsWithConfirmation.xaml page is displayed. <\/span><\/li>\n<li><span style=\"font-size: small\">Add the following XAML code in the namespace declaration: \n<div id=\"codeSnippetWrapper\" style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 20px 0px 10px;width: 94.95%;font-family: 'Courier New', courier, monospace;direction: ltr;height: 59px;max-height: 200px;font-size: 8pt;overflow: auto;cursor: text;border: silver 1px solid;padding: 4px\">\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\">xmlns<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">:<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\">phone<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone&#8221;<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\">xmlns<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">:<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\">shell<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone&#8221;<\/span><span style=\"line-height: 115%;font-size: 8.5pt\"><span style=\"font-family: Calibri\">&nbsp;<\/span><\/span><\/p>\n<\/div>\n<p><\/span><\/li>\n<li><span style=\"font-size: small\">To create buttons, add the following XAML code in the &lt;Grid&gt; tag: \n<div id=\"codeSnippetWrapper\" style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 20px 0px 10px;width: 94.95%;font-family: 'Courier New', courier, monospace;direction: ltr;height: 95px;max-height: 200px;font-size: 8pt;overflow: auto;cursor: text;border: silver 1px solid;padding: 4px\">\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&lt;<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">TextBlock<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Height<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;60&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> HorizontalAlignment<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Left&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Margin<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;65,12,0,0&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Name<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;textBlock1&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Text<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Username&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> VerticalAlignment<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Top&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Width<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;169&#8243; \/&gt;<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&lt;<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">TextBox<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Height<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;78&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> HorizontalAlignment<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Left&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Margin<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;60,60,0,0&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Name<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;textBoxUsername&#8221;<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"> <span style=\"color: red\"><span>&nbsp;<\/span>VerticalAlignment<\/span><span style=\"color: blue\">=&#8221;Top&#8221;<\/span><span style=\"color: red\"> Width<\/span><span style=\"color: blue\">=&#8221;274&#8243;<\/span> <span style=\"color: blue\"><span>&nbsp;<\/span>\/&gt;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&lt;<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">TextBlock<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Height<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;60&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> HorizontalAlignment<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Left&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Margin<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;65,160,0,0&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Name<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;textBlock2&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Text<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Password&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> VerticalAlignment<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Top&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Width<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;169&#8243; \/&gt;<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">&lt;<\/span><span style=\"font-family: 'Courier New';color: #a31515;font-size: 8.5pt\">PasswordBox<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Height<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;78&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> HorizontalAlignment<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Left&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Margin<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;60,208,0,0&#8243;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Name<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;passwordBoxPassword&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> VerticalAlignment<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;Top&#8221;<\/span><span style=\"font-family: 'Courier New';color: red;font-size: 8.5pt\"> Width<\/span><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">=&#8221;274&#8243; \/&gt;<\/span><\/p>\n<\/div>\n<p><\/span><\/li>\n<li><span style=\"font-size: small\">Open the SettingsWithConfirmation.xaml.vb page. The page is displayed with the following code: \n<div id=\"codeSnippetWrapper\" style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 20px 0px 10px;width: 94.95%;font-family: 'Courier New', courier, monospace;direction: ltr;height: 109px;max-height: 200px;font-size: 8pt;overflow: auto;cursor: text;border: silver 1px solid;padding: 4px\">\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">Partial<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"> <span style=\"color: blue\">Public<\/span> <span style=\"color: blue\">Class<\/span> <span style=\"color: #2b91af\">SettingsWithConfirmation<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Inherits<\/span> <span style=\"color: #2b91af\">PhoneApplicationPage<\/span><\/span><span style=\"font-family: Consolas;color: #2b91af;font-size: 8.5pt\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Public<\/span> <span style=\"color: blue\">Sub<\/span> <span style=\"color: blue\">New<\/span>()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>InitializeComponent()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Sub<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">End<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"> <span style=\"color: blue\">Class<\/span><\/span><\/p>\n<\/div>\n<p><\/span><\/li>\n<li><span style=\"font-size: small\">Replace the code in Step 6 with the following code: \n<div id=\"codeSnippetWrapper\" style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 20px 0px 10px;width: 94.95%;font-family: 'Courier New', courier, monospace;direction: ltr;height: 109px;max-height: 200px;font-size: 8pt;overflow: auto;cursor: text;border: silver 1px solid;padding: 4px\">\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">Partial<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"> <span style=\"color: blue\">Public<\/span> <span style=\"color: blue\">Class<\/span> <span style=\"color: #2b91af\">SettingsWithConfirmation<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Inherits<\/span> <span style=\"color: #2b91af\">PhoneApplicationPage<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> settings <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">New<\/span> <span style=\"color: #2b91af\">AppSettings<\/span>()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Public<\/span> <span style=\"color: blue\">Sub<\/span> <span style=\"color: blue\">New<\/span>()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>InitializeComponent()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green\">&#8216; Add an Application Bar that has a &#8216;done&#8217; confirmation button and <\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green\">&#8216; a &#8216;cancel&#8217; button<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ApplicationBar = <span style=\"color: blue\">New<\/span> <span style=\"color: #2b91af\">ApplicationBar<\/span>()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ApplicationBar.IsMenuEnabled = <span style=\"color: blue\">True<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ApplicationBar.IsVisible = <span style=\"color: blue\">True<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ApplicationBar.Opacity = 1.0<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Dim<\/span> doneButton <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">New<\/span> <span style=\"color: #2b91af\">ApplicationBarIconButton<\/span>(<span style=\"color: blue\">New<\/span> <span style=\"color: #2b91af\">Uri<\/span>(<span style=\"color: #a31515\">&#8220;\/Images\/appbar.check.rest.png&#8221;<\/span>, <span style=\"color: #2b91af\">UriKind<\/span>.Relative))<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>doneButton.Text = <span style=\"color: #a31515\">&#8220;done&#8221;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">AddHandler<\/span> doneButton.Click, <span style=\"color: blue\">AddressOf<\/span> doneButton_Click<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Dim<\/span> cancelButton <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">New<\/span> <span style=\"color: #2b91af\">ApplicationBarIconButton<\/span>(<span style=\"color: blue\">New<\/span> <span style=\"color: #2b91af\">Uri<\/span>(<span style=\"color: #a31515\">&#8220;\/Images\/appbar.cancel.rest.png&#8221;<\/span>, <span style=\"color: #2b91af\">UriKind<\/span>.Relative))<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>cancelButton.Text = <span style=\"color: #a31515\">&#8220;cancel&#8221;<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">AddHandler<\/span> cancelButton.Click, <span style=\"color: blue\">AddressOf<\/span> cancelButton_Click<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ApplicationBar.Buttons.Add(doneButton)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ApplicationBar.Buttons.Add(cancelButton)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green\">&#8216; Copy the current settings into the text boxes as the new values<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green\">&#8216; entered in will not be saved until the user clicks the &#8216;done&#8217; button.<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>textBoxUsername.Text = settings.UsernameSetting<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>passwordBoxPassword.Password = settings.PasswordSetting<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Sub<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> <span style=\"color: blue\">Sub<\/span> doneButton_Click(<span style=\"color: blue\">ByVal<\/span> sender <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">Object<\/span>, <span style=\"color: blue\">ByVal<\/span> e <span style=\"color: blue\">As<\/span> <span style=\"color: #2b91af\">EventArgs<\/span>)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>settings.UsernameSetting = textBoxUsername.Text<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>settings.PasswordSetting = passwordBoxPassword.Password<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>NavigationService.GoBack()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Sub<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Private<\/span> <span style=\"color: blue\">Sub<\/span> cancelButton_Click(<span style=\"color: blue\">ByVal<\/span> sender <span style=\"color: blue\">As<\/span> <span style=\"color: blue\">Object<\/span>, <span style=\"color: blue\">ByVal<\/span> e <span style=\"color: blue\">As<\/span> <span style=\"color: #2b91af\">EventArgs<\/span>)<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>NavigationService.GoBack()<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">End<\/span> <span style=\"color: blue\">Sub<\/span><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';font-size: 8.5pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-family: 'Courier New';color: blue;font-size: 8.5pt\">End<\/span><span style=\"font-family: 'Courier New';font-size: 8.5pt\"> <span style=\"color: blue\">Class<\/span><\/span><\/p>\n<\/div>\n<p><i>Note: This method creates an application bar with the done and the cancel buttons. These buttons are required by the user to confirm or cancel the changes. This method also creates event handlers for the button click events. <\/i><\/span><\/li>\n<\/ol>\n<p><span style=\"font-size: small\">There you are! Now your settings page application for Windows Phone 7 is ready! You just need to build and debug the application.<\/span><\/p>\n<h3>Step 5 &#8211; Build and debug the application<\/h3>\n<ol>\n<li><span style=\"font-size: small\">To build the application, select Build &gt; Build Solution. The project should build without any errors. If there are errors, check the earlier steps, correct the errors, and then build the application again. <\/span><\/li>\n<li><span style=\"font-size: small\">To debug the application, set the deployment target of the application to &ldquo;Windows Phone 7 Emulator&rdquo;. <\/span><\/li>\n<li><span style=\"font-size: small\">Select Debug &gt; Start Debugging. The emulator window is displayed. <br \/><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/03\/3660.Emulator.bmp\" width=\"272\" border=\"0\" height=\"502\" \/><\/span><\/li>\n<li><span style=\"font-size: small\">To test the settings page that does not require a confirmation button, click &ldquo;settings&rdquo; on the application bar. The settings screen is displayed without the confirmation button. <br \/><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/03\/4643.Without20confimation.bmp\" width=\"278\" border=\"0\" height=\"519\" \/><\/span><\/li>\n<li><span style=\"font-size: small\">To test the screen, click any of the options. The settings will be changed immediately and saved to isolated storage. <\/span><\/li>\n<li><span style=\"font-size: small\">To test the settings page that requires a confirmation button, click &ldquo;Settings With Confirmation&rdquo;. The settings screen is displayed with the confirmation button. <br \/><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/03\/3252.With20confirmation.bmp\" width=\"278\" border=\"0\" height=\"561\" \/><\/span><\/li>\n<li><span style=\"font-size: small\">Enter the username and the password details and click the Right arrow icon to confirm the changes. The settings will be changed and stored in isolated storage. <br \/><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/03\/2133.Done_.bmp\" border=\"0\" \/><\/span><\/li>\n<\/ol>\n<p><i><span style=\"font-size: small\">Note: To stop debugging the application, select Debug &gt; Stop Debugging.<\/span><\/i><\/p>\n<h3>Step 6 &#8211; Rebuild in the release mode before publishing<\/h3>\n<ol>\n<li><span style=\"font-size: small\">On the standard toolbar, change the configuration manager to Release. <\/span><\/li>\n<li><span style=\"font-size: small\">To rebuild the application, select Build &gt; Rebuild. The XAP file of the application is generated, which is the package that you will have to submit in the marketplace to publish the application. You can also locate this XAP file in the BinRelease folder. <br \/><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/03\/0537.XAP_.bmp\" border=\"0\" \/><\/span><\/li>\n<\/ol>\n<p><span style=\"font-size: small\">Finally, to submit your application to the market place, you can refer to <\/span><a href=\"http:\/\/create.msdn.com\/en-US\/home\/about\/app_submission_walkthrough_upload\"><span style=\"font-size: small\">upload your application walkthrough<\/span><\/a><span style=\"font-size: small\">.<\/span><\/p>\n<h3>Summary<\/h3>\n<p><span style=\"font-size: small\">Bravo! Buenos! You have successfully created a settings page for Windows Phone 7, that too in just 6 simple steps! You can find the full source code for the settings page application <\/span><a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ff431744(v=VS.92).aspx\"><span style=\"font-size: small\">here<\/span><\/a><span style=\"font-size: small\">. This application uses general Silverlight and Visual Basic features that are applicable for different application types including Windows Phone application. <\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have experienced lot of fun creating Windows Phone 7 applications in Visual Basic and writing about them here. In our last post, I explained how to create a Bing Maps application for Windows Phone 7. In this blog, I want to share a sample that will help you to create a settings page for [&hellip;]<\/p>\n","protected":false},"author":260,"featured_media":8818,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[195],"tags":[],"class_list":["post-643","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-basic"],"acf":[],"blog_post_summary":"<p>I have experienced lot of fun creating Windows Phone 7 applications in Visual Basic and writing about them here. In our last post, I explained how to create a Bing Maps application for Windows Phone 7. In this blog, I want to share a sample that will help you to create a settings page for [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts\/643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/users\/260"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/comments?post=643"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts\/643\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/media\/8818"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/media?parent=643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/categories?post=643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/tags?post=643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}