title: IsolatedStorageSettings and NavigationService Error
body: <p>So I took a break and went from C# to VB in developing Windows Phone 8 apps. It's just more of a test and I have this really strange problem.</p>
  
  <p>First off all my basic scenario is that I have Page A and Page B. The user has to fill in a few details before going to Page B. Page B will only be shown if the user has already filled out the information in Page A, sort of like a first time run.</p>
  
  <p>What I've done is that I've added this code:</p>
  
  <pre><code>Private Sub createbtn_Click(sender As Object, e As RoutedEventArgs) Handles createbtn.Click
      '...
      IsoSettings.Add("AccountCreated", Nothing)
      NavigationService.Navigate(New Uri("/MainMenu.xaml", UriKind.Relative))
      NavigationService.RemoveBackEntry()
  End Sub
  </code></pre>
  
  <p>Once the user clicks on the "create account" button. He will be navigated to Page B and hereafter the user will not have to go through filling out the information in Page A. The "AccountCreated" is a sort of Check. In here:</p>
  
  <pre><code>Protected Overrides Sub OnNavigatedTo(e As NavigationEventArgs)        
      If IsoSettings.Contains("AccountCreated") Then            
          NavigationService.Navigate(New Uri("/MainMenu.xaml", UriKind.Relative)) 'Page B
          NavigationService.RemoveBackEntry()          
      Else
          NavigationService.Navigate(New Uri("/MainPage.xaml", UriKind.Relative)) 'Page A
      End If
  End Sub
  </code></pre>
  
  <p>So basically that checks and sees if IsoSettings contains "AccountCreated" then take the user to Page B, if not take him to Page A. Now this way works fine. No problems. Works the way I want it to.</p>
  
  <p>Now I've added a settings page. There is one setting where the user can decide whether to show the Login page or not. If it's "off" then obviously it's not going to be shown and On...</p>
  
  <p>I've added this: </p>
  
  <pre><code>If IsoSettings.Contains("AccountCreated") Then
          Try
              Dim ShowLoginPage As Byte = CByte(AppSettings("StartupLogin"))
              If ShowLoginPage = 0 Then
                  NavigationService.Navigate(New Uri("/LoginPage.xaml", UriKind.Relative))
                  NavigationService.RemoveBackEntry()
              ElseIf ShowLoginPage = 1 Then
                  NavigationService.Navigate(New Uri("/MainMenu.xaml", UriKind.Relative))
                  NavigationService.RemoveBackEntry()
              End If
          Catch ex As KeyNotFoundException
              AppSettings.Add("StartupLogin", 0)
          End Try
      Else
          NavigationService.Navigate(New Uri("/MainPage.xaml", UriKind.Relative))
  End If
  </code></pre>
  
  <p>Now this is where the problem occurs. So when the user first runs this app. He has to go through Page A. He fills the information and then get's navigated to the Login page. Now once the user logs in or just closes the app while in the login page and re-opens it, the users gets navigated to Page A, to fix this the user has to close the app and re-open it. </p>
  
  <p>Can someone please clear things for me? 
  Thanks!</p>