I have following situation in my WinRT metro (c# – xaml) application :
User launch the application and he or she is not logged in. In the menu bar I have button which navigates them to Shopping cart. It’s important to mention that they can click on it regardless of logged in/out status.
So I have this :
Home Page - > Login Page - > Shopping Cart
And everything works great, but when I try press BACK button on my Shopping Cart page I’m navigated back to Login Page, which make sense, because page is in my navigation history. But I don’t want that, I want to return user to Home Page and skip login page.
My question is how to do that, and how to manipulate Frame Navigation Stack on WinRT. I tried with going Back twice, but with no luck.
Btw, my page is “LayoutAwarePage” page and I’m using NavigationService similar to this
http://dotnetbyexample.blogspot.com/2012/06/navigationservice-for-winrt.html.
You can approach it in different ways. You can make it so the back button navigates back multiple times until it reaches the home page or skips through the log in page. You could also make the log in page something that shows up outside of the navigation
Frame– either on a popup or in a different layer in the application.*Update
In 8.1 the platform introduced the
BackStackandForwardStackproperties on theFramewhich you can manipulate.