how can i remove back stack in wp7.1.I have 3 pages and say A,B,C when i navigate from A to B and in B there is a button to add new contact detail.when i click it page navigate to page C and In page C there is a Done button and when i clicked done button the page navigate to home page that is the page A and when i clicked back button from page A.the page C is visible since it is not finished.How can i clear the back stack.Also let me know is there any method to clear a particular page from the back stack.if the back stack contain page A,B,C,D and i have to clear the last two pages that is C and D.is that possible in the windows phone Mango?
On the Load Event
of the main page, put the following code:
while (NavigationService.CanGoBack)
{
NavigationService.RemoveBackEntry();
}
I'm not sure whether it's a good practice, but since in Mango users are supposed to close their apps by clicking the back button, I think it's a good way to avoid backing the whole history.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With