Catrobat.IDE.WindowsShared.Common.NavigationHelper.CoreWindow_PointerPressed C# (CSharp) Method

CoreWindow_PointerPressed() private method

Invoked on every mouse click, touch screen tap, or equivalent interaction when this page is active and occupies the entire window. Used to detect browser-style next and previous mouse button clicks to navigate between pages.
private CoreWindow_PointerPressed ( CoreWindow sender, PointerEventArgs e ) : void
sender CoreWindow Instance that triggered the event.
e PointerEventArgs Event data describing the conditions that led to the event.
return void
        private void CoreWindow_PointerPressed(CoreWindow sender,
            PointerEventArgs e)
        {
            var properties = e.CurrentPoint.Properties;

            // Ignore button chords with the left, right, and middle buttons
            if (properties.IsLeftButtonPressed || properties.IsRightButtonPressed ||
                properties.IsMiddleButtonPressed) return;

            // If back or foward are pressed (but not both) navigate appropriately
            bool backPressed = properties.IsXButton1Pressed;
            bool forwardPressed = properties.IsXButton2Pressed;
            if (backPressed ^ forwardPressed)
            {
                e.Handled = true;
                if (backPressed) this.GoBackCommand.Execute(null);
                if (forwardPressed) this.GoForwardCommand.Execute(null);
            }
        }
#endif