Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6846737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:39:37+00:00 2026-05-27T00:39:37+00:00

I am navigating through different pages within my application. After I login, I come

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:39:37+00:00Added an answer on May 27, 2026 at 12:39 am

    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:

    while (this.NavigationService.BackStack.Any())
    {
       this.NavigationService.RemoveBackEntry();
    }
    

    Also, if you want to remove only the previous page after checking its URI:

    var previousPage = this.NavigationService.BackStack.FirstOrDefault();
    
    if (previousPage != null && previousPage.Source.ToString().StartsWith("/MainPage.xaml"))
    {
        this.NavigationService.RemoveBackEntry();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble navigating to a different controller view from another controller action. e.g.
How do you dismiss a popover from within a navigation stack. I have a
After weeks of using Prism I have been through every kind of navigation methods.
When navigating through array with next() and prev() , how could you get the
Can I somehow disable ListView items navigation through keyboard (arrow keys), and leave navigation
While running through the cheat sheet create a navigation rule for the Eclipse JavaServer
When navigating to previous calls/events during debugging with IntelliTrace, I can't see a snapshot
after years navigating seas of unorganized documents, I'm starting to look for a cheap/free
I started noticing strange behavior when navigating the main toolbar of my Winforms application,
In my application, the view below navigation controller moves up and is visible below

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.