Created
December 6, 2014 22:09
-
-
Save scionwest/fc91fe9e9748764405a4 to your computer and use it in GitHub Desktop.
App.Xaml.cs override
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void OnHardwareButtonsBackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) | |
{ | |
var page = (Page)((Frame)Windows.UI.Xaml.Window.Current.Content).Content; | |
if (page is INavigateBackwards) | |
{ | |
var firstRunPage = (INavigateBackwards)page; | |
if (!firstRunPage.CanNavigateBack()) | |
{ | |
e.Handled = true; | |
return; | |
} | |
} | |
base.OnHardwareButtonsBackPressed(sender, e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment