I have a multi page windows phone application. I have a main page and a new account page. Now when the user chooses to open a new account he is navigated to the new account page. After he inputs all the details and clicks on the ‘Save’ button he is navigated to the Main page by using the navigation service:
NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
Now when on the main page after performing the above steps, if the user clicks on hardware ‘back’ button he gets navigated to the new account page. This shouldn’t happen! It should just exist the application as the Main page was by default the loading page.
I have a few other pages also from where I navigate to the main page and in all of them the above scenario takes place!
If you only can navigate from the main page to the account page you can go back to the main page (thereby “undoing” the history) by going back: