Delete back entry in windows mango

How can I remove the back stack in wp7.1.I has 3 pages and say A, B, C when I go from A to B and there is a button in B to add new contact information. When I click on it, go to page C, and the “Finish” button appears on page C, and when I clicked “Finish”, the page will move to the main page, which is page A and when I clicked the “Back” button from page A Page C is visible because it is not finished yet. How can I clear the back stack. Also let me know if there is any method to clear a specific page from the back stack. the stack contains pages A, B, C, D and I have to clear the last two pages with C and D., what is possible in a Windows Mango phone?

+5
source share
1 answer

On the Load Eventmain page, enter the following code:

while (NavigationService.CanGoBack)
{
    NavigationService.RemoveBackEntry();
}

I'm not sure this is a good practice, but since users must close their applications in Mango by clicking the back button, I think this is a good way to avoid supporting the whole story.

+7
source

All Articles