If you only want to store a few values, you should make use of the IsolatedStorageSettings
class. It will allow you to easily store key-value pairs in the Isolated Storage.
Sample VB.NET code taken from MSDN (link):
Imports System.IO.IsolatedStorage
Partial Public Class Page
Inherits UserControl
Private userSettings As IsolatedStorageSettings = IsolatedStorageSettings.ApplicationSettings
Public Sub New()
InitializeComponent()
' Retrieve and set user name.
Try
Dim name As String = CType(userSettings("name"), String)
tbGreeting.Text = "Hello, " & name
Catch ex As System.Collections.Generic.KeyNotFoundException
' No preference is saved.
tbGreeting.Text = "Hello, World"
End Try
End Sub
Private Sub btnAddName_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
Try
userSettings.Add("name", tbName.Text)
tbResults.Text = "Name saved. Refresh page to see changes."
Catch ex As ArgumentException
tbResults.Text = ex.Message
End Try
End Sub
Private Sub btnChangeName_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
userSettings("name") = tbName.Text
tbResults.Text = "Name changed. Refresh page to see changes."
End Sub
Private Sub btnRemoveName_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
If userSettings.Remove("name") = True Then
tbResults.Text = "Name removed. Refresh page to see changes."
Else
tbResults.Text = "Name could not be removed. Key does not exist."
End If
End Sub
Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
userSettings.Clear()
tbResults.Text = "Settings cleared. Refresh page to see changes."
End Sub
End Class