Thursday, 17 April 2014

Backstack or back page in windows phone

Simply use NavigationService.GoBack(); instead of using
NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
It will clear all catch automatically.
or you can use NavigationService.RemoveBackEntry(); when coming again to read second article. Use something like-
int a = NavigationService.BackStack.Count();
while (a > number) //number is stack count when comes to main page first time
{
     this.NavigationService.RemoveBackEntry();
     a = NavigationService.BackStack.Count();
}



http://stackoverflow.com/questions/17065713/windows-phone-8-back-button

No comments:

Post a Comment