Skip to content

Instantly share code, notes, and snippets.

@rodmanwu
Created January 9, 2013 03:27
Show Gist options
  • Save rodmanwu/4490320 to your computer and use it in GitHub Desktop.
Save rodmanwu/4490320 to your computer and use it in GitHub Desktop.
windows phoen: Pop Unwanted page
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
base.OnNavigatedTo(e);
var lastPage = NavigationService.BackStack.FirstOrDefault();
if (lastPage != null && lastPage.Source.ToString() == "/MainPage.xaml")
{
NavigationService.RemoveBackEntry();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment