Skip to content

Commit

Permalink
Update navigation-history-and-backwards-navigation.md
Browse files Browse the repository at this point in the history
Removed the e.Handled check.
  • Loading branch information
martingbrown authored Jun 15, 2021
1 parent d76dbb0 commit 690b013
Showing 1 changed file with 12 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -470,14 +470,12 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
// Handle mouse back button.
private void CoreWindow_PointerPressed(CoreWindow sender, PointerEventArgs e)
{
// For this event, e.Handled arrives as 'true', so invert the value.
if (e.CurrentPoint.Properties.IsXButton1Pressed
&& !e.Handled)
// For this event, e.Handled arrives as 'true'.
if (e.CurrentPoint.Properties.IsXButton1Pressed)
{
e.Handled = !TryGoBack();
}
else if (e.CurrentPoint.Properties.IsXButton2Pressed
&& !e.Handled)
else if (e.CurrentPoint.Properties.IsXButton2Pressed)
{
e.Handled = !TryGoForward();
}
Expand Down Expand Up @@ -518,14 +516,12 @@ private:
// Handle mouse forward and back buttons.
void CoreWindow_PointerPressed(CoreWindow const& /* sender */, PointerEventArgs const& e)
{
// For this event, e.Handled arrives as 'true', so invert the value.
if (e.CurrentPoint().Properties().IsXButton1Pressed()
&& !e.Handled())
// For this event, e.Handled arrives as 'true'.
if (e.CurrentPoint().Properties().IsXButton1Pressed())
{
e.Handled(!TryGoBack());
}
else if (e.CurrentPoint().Properties().IsXButton2Pressed()
&& !e.Handled())
else if (e.CurrentPoint().Properties().IsXButton2Pressed())
{
e.Handled(!TryGoForward());
}
Expand Down Expand Up @@ -628,14 +624,12 @@ private void System_BackRequested(object sender, BackRequestedEventArgs e)
// Handle mouse back button.
private void CoreWindow_PointerPressed(CoreWindow sender, PointerEventArgs e)
{
// For this event, e.Handled arrives as 'true', so invert the value.
if (e.CurrentPoint.Properties.IsXButton1Pressed
&& !e.Handled)
// For this event, e.Handled arrives as 'true'.
if (e.CurrentPoint.Properties.IsXButton1Pressed)
{
e.Handled = !TryGoBack();
}
else if (e.CurrentPoint.Properties.IsXButton2Pressed
&& !e.Handled)
else if (e.CurrentPoint.Properties.IsXButton2Pressed)
{
e.Handled = !TryGoForward();
}
Expand Down Expand Up @@ -762,14 +756,12 @@ private:
// Handle mouse forward and back buttons.
void CoreWindow_PointerPressed(CoreWindow const& /* sender */, PointerEventArgs const& e)
{
// For this event, e.Handled arrives as 'true', so invert the value.
if (e.CurrentPoint().Properties().IsXButton1Pressed()
&& !e.Handled())
// For this event, e.Handled arrives as 'true'.
if (e.CurrentPoint().Properties().IsXButton1Pressed())
{
e.Handled(!TryGoBack());
}
else if (e.CurrentPoint().Properties().IsXButton2Pressed()
&& !e.Handled())
else if (e.CurrentPoint().Properties().IsXButton2Pressed())
{
e.Handled(!TryGoForward());
}
Expand Down

0 comments on commit 690b013

Please sign in to comment.