Skip to content

Commit

Permalink
Merge pull request #1019 from Mr1Penguin/check-back-button-handled
Browse files Browse the repository at this point in the history
Check for e.Handled inside PrismApplication.OnGoBackRequested
  • Loading branch information
bartlannoeye authored Apr 16, 2017
2 parents ba037e1 + 27f218b commit 68f784d
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Source/Windows10/Prism.Windows/PrismApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -434,14 +434,17 @@ private void OnGoForwardRequested(object sender, DeviceGestureEventArgs e)
/// <param name="e"></param>
private void OnGoBackRequested(object sender, DeviceGestureEventArgs e)
{
if (NavigationService.CanGoBack())
if (!e.Handled)
{
NavigationService.GoBack();
e.Handled = true;
}
else if (DeviceGestureService.IsHardwareBackButtonPresent && e.IsHardwareButton)
{
Exit();
if (NavigationService.CanGoBack())
{
NavigationService.GoBack();
e.Handled = true;
}
else if (DeviceGestureService.IsHardwareBackButtonPresent && e.IsHardwareButton)
{
Exit();
}
}
}

Expand Down

0 comments on commit 68f784d

Please sign in to comment.