I am navigating through different pages within my application. After I login, I come to home page from where the navigation starts. During navigation, when I come to homepage, I want to go to the login page by pressing BackKey but I can only navigate to previously navigated page. I could have overriden the BackKeyPress event to navigate to the Login Page but in LoginPage I should again override the Backkeypress otherwise there appears to be cycle between loginpage and homepage on backkey press. Is there anyway to clear the navigation history?
相关问题
- An error is occur when we use navigation to move o
- binding font-awesome character in XAML to Text
- Windows Phone 7 call ASMX web service
- Can windows phone 7 microphone detect frequencies
- How to show/hide (with animation if possible) a Ch
相关文章
- Working with hmacsha256 in windows store app
- WP7 Alert dialog
- Add Service Reference and Add Web Reference?
- Scrollviewer & SIP Issue (WP7.5 Mango)
- Database for Windows Phone 7 [closed]
- Windows phone 7: how to post tweet to twitter
- How to Play youtube videos in windows phone 7?
- Passing objects between classes in Windows Phone/C
While I know the original question was for 7, in Windows Phone 8.1 the NavigationService no longer exists.
Here is the Windows Phone 8.1 code
You can use NavigationService.RemoveBackEntry: http://msdn.microsoft.com/en-us/library/system.windows.navigation.navigationservice.removebackentry%28v=VS.92%29.aspx
For instance, to remove all entries from the stack:
Also, if you want to remove only the previous page after checking its URI: