Example #1
0
 private void OnPreviewStylusMove(object sender, StylusEventArgs e)
 {
     if (!e.Handled)
     {
         ApplicationInputHandler.OnPreviewStylusMove(e);
     }
 }
Example #2
0
 private void OnPreviewStylusSystemGesture(object sender, StylusSystemGestureEventArgs e)
 {
     if (!e.Handled)
     {
         ApplicationInputHandler.OnPreviewStylusSystemGesture(e);
     }
 }
Example #3
0
        protected override void OnKeyDown(KeyEventArgs e)
        {
            // Custom key handling for main page
            if (!e.Handled)
            {
                if (e.KeyboardDevice.Modifiers == ModifierKeys.None)
                {
                    switch (e.Key)
                    {
                    case Key.F9:
                        OnF9KeyPress(e);
                        break;

                    case Key.F11:
                        OnF11KeyPress(e);
                        break;

                    case Key.Escape:
                        OnEscapeKeyPress(e);
                        break;

                    default:
                        break;
                    }
                }
                else if (e.KeyboardDevice.Modifiers == ModifierKeys.Control)
                {
                    switch (e.Key)
                    {
                    case Key.T:
                        ApplicationCommands.SwitchThemeCommand.Execute(null);
                        break;
                    }
                }
            }

            // Next, call application-wide input handler.
            if (!e.Handled)
            {
                ApplicationInputHandler.OnKeyDown(e);
            }

            // Finally, call base if not handled.
            if (!e.Handled)
            {
                base.OnKeyDown(e);
            }
        }
Example #4
0
        protected override void OnMouseWheel(MouseWheelEventArgs e)
        {
            // Custom logic for MainPage's MouseWheel should be put before calling global handler

            // Next, call global handler
            if (!e.Handled)
            {
                ApplicationInputHandler.OnMouseWheel(e);
            }

            // Finally, call base if not handled
            if (!e.Handled)
            {
                base.OnMouseWheel(e);
            }
        }