I have an app I’m working on where the user gets navigated two pages deep, meaning:
Select stuff, click next -> select stuff, click next -> results
On the results page, I’m doing a Navigationservice.Navigate() back to MainPage.xaml but now the user has the ability to hit the back button which can break some things in the app. How can I clear that buffer of pages available? Any way to for Navigationservice.canGoBack return false even if it’s true? If the buffer can’t be cleared, the is there a method which will restart the app to get the user back to the MainPage.xaml without having any navigation history?
Thank you,
Nick
Here’s a few references for solutions to clearing the back stack.
Want to “reset” an app but how to deal with backstack pages?
Removing a page from the navigation stack
Can the navigation history be cleared
Alternatively, consider Peter Torr’s suggestions on handling navigation scenarios.
Introducing the concept of “Places”
Redirecting an initial navigation