Created
December 6, 2014 20:19
-
-
Save scionwest/f823ecd4307f3109e0e6 to your computer and use it in GitHub Desktop.
Updated FirstRunPage
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
public sealed partial class FirstRunPage : VisualStateAwarePage | |
{ | |
public FirstRunPage() | |
{ | |
this.InitializeComponent(); | |
} | |
protected override void OnNavigatedTo(NavigationEventArgs e) | |
{ | |
//base.OnNavigatedTo(e); | |
#if WINDOWS_PHONE_APP | |
HardwareButtons.BackPressed += HardwareBack_OnPressed; | |
#endif | |
} | |
protected override void OnNavigatedFrom(NavigationEventArgs e) | |
{ | |
//base.OnNavigatedFrom(e); | |
#if WINDOWS_PHONE_APP | |
HardwareButtons.BackPressed -= HardwareBack_OnPressed; | |
#endif | |
} | |
protected override void GoBack(object sender, RoutedEventArgs eventArgs) | |
{ | |
return; | |
} | |
private void HardwareBack_OnPressed(object sender, BackPressedEventArgs e) | |
{ | |
//Action handledCallback = () => e.Handled = true; | |
//var state = new Dictionary<string, object> { { "Callback", handledCallback } }; | |
e.Handled = true; | |
// ((INavigationAware)this.DataContext).OnNavigatedTo("Back", NavigationMode.Back, state); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment