Ejemplo n.º 1
0
        /// <summary>
        /// Called when a mouse button is pressed down.
        /// </summary>
        /// <param name="button">
        /// The button.
        /// </param>
        /// <param name="e">
        /// The <see cref="System.Windows.Input.MouseButtonEventArgs"/> instance containing the event data.
        /// </param>
        private void OnMouseButtonDown(OxyMouseButton button, MouseButtonEventArgs e)
        {
            if (this.mouseManipulator != null)
            {
                return;
            }

            this.Focus();
            this.CaptureMouse();

            int clickCount = 1;

            if (MouseButtonHelper.IsDoubleClick(this, e))
            {
                clickCount = 2;
            }

            if (this.ActualModel != null)
            {
                var args = this.CreateMouseEventArgs(button, e);
                this.ActualModel.HandleMouseDown(this, args);
                if (args.Handled)
                {
                    return;
                }
            }

            this.mouseManipulator = this.GetManipulator(button, clickCount);

            if (this.mouseManipulator != null)
            {
                this.mouseManipulator.Started(this.CreateManipulationEventArgs(e));
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates the mouse event arguments.
 /// </summary>
 /// <param name="button">The button.</param>
 /// <param name="e">The <see cref="System.Windows.Input.MouseEventArgs"/> instance containing the event data.</param>
 /// <returns>
 /// Mouse event arguments.
 /// </returns>
 private OxyMouseEventArgs CreateMouseEventArgs(OxyMouseButton button, MouseEventArgs e)
 {
     return(new OxyMouseEventArgs
     {
         ChangedButton = button,
         Position = e.GetPosition(this).ToScreenPoint(),
         IsShiftDown = IsShiftDown(),
         IsControlDown = IsControlDown(),
         IsAltDown = IsAltDown()
     });
 }
        /// <summary>
        /// Raises the MouseButtonUp event.
        /// </summary>
        /// <param name="button">The button.</param>
        /// <param name="e">The <see cref="System.Windows.Input.MouseButtonEventArgs" /> instance containing the event data.</param>
        protected void OnMouseButtonUp(OxyMouseButton button, MouseButtonEventArgs e)
        {
            if (e.Handled)
            {
                return;
            }

            this.ReleaseMouseCapture();

            e.Handled = this.ActualController.HandleMouseUp(this, e.ToMouseUpEventArgs(button, this));
        }
        /// <summary>
        /// Called when a mouse button is pressed down.
        /// </summary>
        /// <param name="button">The button.</param>
        /// <param name="e">The <see cref="System.Windows.Input.MouseButtonEventArgs" /> instance containing the event data.</param>
        protected void OnMouseButtonDown(OxyMouseButton button, MouseButtonEventArgs e)
        {
            if (e.Handled)
            {
                return;
            }

            this.Focus();
            this.CaptureMouse();

            e.Handled = this.ActualController.HandleMouseDown(this, e.ToMouseDownEventArgs(button, this));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Gets the manipulator for the current mouse button and modifier keys.
        /// </summary>
        /// <param name="button">The button.</param>
        /// <param name="clickCount">The click count.</param>
        /// <returns>
        /// A manipulator or null if no gesture was recognized.
        /// </returns>
        private ManipulatorBase GetManipulator(OxyMouseButton button, int clickCount)
        {
            bool control = IsControlDown();
            bool shift   = IsShiftDown();
            bool alt     = IsAltDown();
            bool lmb     = button == OxyMouseButton.Left;
            bool rmb     = button == OxyMouseButton.Right;
            bool mmb     = button == OxyMouseButton.Middle;
            bool xb1     = button == OxyMouseButton.XButton1;
            bool xb2     = button == OxyMouseButton.XButton2;

            // MMB / control RMB / control+alt LMB
            if (mmb || (control && rmb) || (control && alt && lmb))
            {
                if (clickCount == 2)
                {
                    return(new ResetManipulator(this));
                }

                return(new ZoomRectangleManipulator(this));
            }

            // Right mouse button / alt+left mouse button
            if (rmb || (lmb && alt))
            {
                return(new PanManipulator(this));
            }

            // Left mouse button
            if (lmb)
            {
                return(new TrackerManipulator(this)
                {
                    Snap = !control, PointsOnly = shift
                });
            }

            // XButtons are zoom-stepping
            if (xb1 || xb2)
            {
                double d = xb1 ? 0.05 : -0.05;
                return(new ZoomStepManipulator(this, d, control));
            }

            return(null);
        }
        public override void OnMouseDown(ScreenPoint pt, OxyMouseButton button, int clickCount, bool control, bool shift)
        {
            base.OnMouseDown(pt, button, clickCount, control, shift);

            if (button != OxyMouseButton.Left)
                return;

            // Middle button double click adds an annotation
            if (clickCount == 2)
            {
                // pc.Annotations.
                pc.Refresh();
            }

            currentSeries = pc.GetSeriesFromPoint(pt) as DataSeries;

            OnMouseMove(pt, control, shift);

            //pc.CaptureMouse();
            // pc.Cursor = Cursors.Cross;
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Raises the MouseButtonUp event.
        /// </summary>
        /// <param name="button">The button.</param>
        /// <param name="e">The <see cref="System.Windows.Input.MouseButtonEventArgs"/> instance containing the event data.</param>
        protected void OnMouseButtonUp(OxyMouseButton button, MouseButtonEventArgs e)
        {
            this.ReleaseMouseCapture();

            if (this.ActualModel != null)
            {
                var args = this.CreateMouseEventArgs(button, e);
                this.ActualModel.HandleMouseUp(this, args);
                if (args.Handled)
                {
                    return;
                }
            }

            if (this.mouseManipulator != null)
            {
                this.mouseManipulator.Completed(this.CreateManipulationEventArgs(e));
                e.Handled = true;
            }

            this.mouseManipulator = null;
        }
Ejemplo n.º 8
0
        public override void OnMouseDown(ScreenPoint pt, OxyMouseButton button, int clickCount, bool control, bool shift)
        {
            base.OnMouseDown(pt, button, clickCount, control, shift);

            if (button != OxyMouseButton.Left)
            {
                return;
            }

            // Middle button double click adds an annotation
            if (clickCount == 2)
            {
                // pc.Annotations.
                pc.Refresh();
            }

            currentSeries = pc.GetSeriesFromPoint(pt) as DataSeries;

            OnMouseMove(pt, control, shift);

            //pc.CaptureMouse();
            // pc.Cursor = Cursors.Cross;
        }
Ejemplo n.º 9
0
 /// <summary>
 /// Converts <see cref="MouseButtonEventArgs" /> to <see cref="OxyMouseEventArgs" /> for a mouse up event.
 /// </summary>
 /// <param name="e">The <see cref="MouseButtonEventArgs" /> instance containing the event data.</param>
 /// <param name="button">The button.</param>
 /// <param name="relativeTo">The <see cref="UIElement" /> that the event is relative to.</param>
 /// <returns>A <see cref="OxyMouseEventArgs" /> containing the converted event arguments.</returns>
 public static OxyMouseEventArgs ToMouseUpEventArgs(this MouseButtonEventArgs e, OxyMouseButton button, UIElement relativeTo)
 {
     return(new OxyMouseEventArgs
     {
         Position = e.GetPosition(relativeTo).ToScreenPoint(),
         ModifierKeys = Keyboard.GetModifierKeys()
     });
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Converts <see cref="MouseButtonEventArgs" /> to <see cref="OxyMouseEventArgs" /> for a mouse down event.
 /// </summary>
 /// <param name="e">The <see cref="MouseButtonEventArgs" /> instance containing the event data.</param>
 /// <param name="button">The button.</param>
 /// <param name="relativeTo">The <see cref="UIElement" /> that the event is relative to.</param>
 /// <returns>A <see cref="OxyMouseDownEventArgs" /> containing the converted event arguments.</returns>
 public static OxyMouseDownEventArgs ToMouseDownEventArgs(this MouseButtonEventArgs e, OxyMouseButton button, UIElement relativeTo)
 {
     return(new OxyMouseDownEventArgs
     {
         ChangedButton = button,
         ClickCount = e.ClickCount,
         Position = e.GetPosition(relativeTo).ToScreenPoint(),
         ModifierKeys = Keyboard.GetModifierKeys()
     });
 }
Ejemplo n.º 11
0
        /// <summary>
        /// Gets the manipulator for the current mouse button and modifier keys.
        /// </summary>
        /// <param name="button">The button.</param>
        /// <param name="clickCount">The click count.</param>
        /// <returns>
        /// A manipulator or null if no gesture was recognized.
        /// </returns>
        private ManipulatorBase GetManipulator(OxyMouseButton button, int clickCount)
        {
            bool control = IsControlDown();
            bool shift = IsShiftDown();
            bool alt = IsAltDown();
            bool lmb = button == OxyMouseButton.Left;
            bool rmb = button == OxyMouseButton.Right;
            bool mmb = button == OxyMouseButton.Middle;
            bool xb1 = button == OxyMouseButton.XButton1;
            bool xb2 = button == OxyMouseButton.XButton2;

            // MMB / control RMB / control+alt LMB
            if (mmb || (control && rmb) || (control && alt && lmb))
            {
                if (clickCount == 2)
                {
                    return new ResetManipulator(this);
                }

                return new ZoomRectangleManipulator(this);
            }

            // Right mouse button / alt+left mouse button
            if (rmb || (lmb && alt))
            {
                return new PanManipulator(this);
            }

            // Left mouse button
            if (lmb)
            {
                return new TrackerManipulator(this) { Snap = !control, PointsOnly = shift };
            }

            // XButtons are zoom-stepping
            if (xb1 || xb2)
            {
                double d = xb1 ? 0.05 : -0.05;
                return new ZoomStepManipulator(this, d, control);
            }

            return null;
        }
 /// <summary>
 /// Binds the specified mouse button to the specified command.
 /// </summary>
 /// <param name="controller">The plot controller.</param>
 /// <param name="mouseButton">The mouse button.</param>
 /// <param name="command">A plot controller command that takes mouse event arguments.</param>
 public static void BindMouseDown(this IController controller, OxyMouseButton mouseButton, IViewCommand <OxyMouseDownEventArgs> command)
 {
     controller.Bind(new OxyMouseDownGesture(mouseButton), command);
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Creates the mouse event arguments.
 /// </summary>
 /// <param name="button">The button.</param>
 /// <param name="e">The <see cref="System.Windows.Input.MouseEventArgs"/> instance containing the event data.</param>
 /// <returns>
 /// Mouse event arguments.
 /// </returns>
 private OxyMouseEventArgs CreateMouseEventArgs(OxyMouseButton button, MouseEventArgs e)
 {
     return new OxyMouseEventArgs
     {
         ChangedButton = button,
         Position = e.GetPosition(this).ToScreenPoint(),
         IsShiftDown = IsShiftDown(),
         IsControlDown = IsControlDown(),
         IsAltDown = IsAltDown()
     };
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InputCommandBinding" /> class by a mouse gesture.
 /// </summary>
 /// <param name="mouseButton">The mouse button.</param>
 /// <param name="modifiers">The modifiers.</param>
 /// <param name="command">The command.</param>
 public InputCommandBinding(OxyMouseButton mouseButton, OxyModifierKeys modifiers, IViewCommand command)
     : this(new OxyMouseDownGesture(mouseButton, modifiers), command)
 {
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OxyMouseDownGesture" /> class.
 /// </summary>
 /// <param name="mouseButton">The mouse button.</param>
 /// <param name="modifiers">The modifiers.</param>
 /// <param name="clickCount">The click count.</param>
 public OxyMouseDownGesture(OxyMouseButton mouseButton, OxyModifierKeys modifiers = OxyModifierKeys.None, int clickCount = 1)
 {
     this.MouseButton = mouseButton;
     this.Modifiers   = modifiers;
     this.ClickCount  = clickCount;
 }
Ejemplo n.º 16
0
        private static void AssertMousePanAtCommandBinding(DynamicPlotController controller, int index, OxyMouseButton expectedMouseButton)
        {
            InputCommandBinding panAtCommand = controller.InputCommandBindings[index];

            Assert.AreEqual(expectedMouseButton, ((OxyMouseDownGesture)panAtCommand.Gesture).MouseButton);
            Assert.AreEqual(PlotCommands.PanAt, panAtCommand.Command);
        }
 public virtual void OnMouseDown(ScreenPoint pt, OxyMouseButton button, int clickCount, bool control, bool shift, bool alt)
 {
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OxyMouseDownGesture" /> class.
 /// </summary>
 /// <param name="mouseButton">The mouse button.</param>
 /// <param name="modifiers">The modifiers.</param>
 /// <param name="clickCount">The click count.</param>
 public OxyMouseDownGesture(OxyMouseButton mouseButton, OxyModifierKeys modifiers = OxyModifierKeys.None, int clickCount = 1)
 {
     this.MouseButton = mouseButton;
     this.Modifiers = modifiers;
     this.ClickCount = clickCount;
 }
Ejemplo n.º 19
0
 public static void SetBindToMouseDown(DependencyObject element, OxyMouseButton value)
 {
     element.SetValue(BindToMouseDownProperty, value);
 }
Ejemplo n.º 20
0
        /// <summary>
        /// Called when a mouse button is pressed down.
        /// </summary>
        /// <param name="button">
        /// The button.
        /// </param>
        /// <param name="e">
        /// The <see cref="System.Windows.Input.MouseButtonEventArgs"/> instance containing the event data.
        /// </param>
        private void OnMouseButtonDown(OxyMouseButton button, MouseButtonEventArgs e)
        {
            if (this.mouseManipulator != null)
            {
                return;
            }

            this.Focus();
            this.CaptureMouse();

            int clickCount = 1;
            if (MouseButtonHelper.IsDoubleClick(this, e))
            {
                clickCount = 2;
            }

            if (this.ActualModel != null)
            {
                var args = this.CreateMouseEventArgs(button, e);
                this.ActualModel.HandleMouseDown(this, args);
                if (args.Handled)
                {
                    return;
                }
            }

            this.mouseManipulator = this.GetManipulator(button, clickCount);

            if (this.mouseManipulator != null)
            {
                this.mouseManipulator.Started(this.CreateManipulationEventArgs(e));
            }
        }
Ejemplo n.º 21
0
        /// <summary>
        /// Raises the MouseButtonUp event.
        /// </summary>
        /// <param name="button">The button.</param>
        /// <param name="e">The <see cref="System.Windows.Input.MouseButtonEventArgs" /> instance containing the event data.</param>
        protected void OnMouseButtonUp(OxyMouseButton button, MouseButtonEventArgs e)
        {
            if (e.Handled)
            {
                return;
            }

            this.ReleaseMouseCapture();

            e.Handled = this.ActualController.HandleMouseUp(this, e.ToMouseUpEventArgs(button, this));
        }
Ejemplo n.º 22
0
        protected override bool OnMouse(SciterElement se, SciterXBehaviors.MOUSE_PARAMS prms)
        {
            switch (prms.cmd)
            {
            case SciterXBehaviors.MOUSE_EVENTS.MOUSE_ENTER:
                ActualController.HandleMouseEnter(this, new OxyMouseEventArgs
                {
                    Position     = new ScreenPoint(prms.pos.X, prms.pos.Y),
                    ModifierKeys = prms.alt_state.GetModifiers()
                });
                break;

            case SciterXBehaviors.MOUSE_EVENTS.MOUSE_LEAVE:
                ActualController.HandleMouseLeave(this, new OxyMouseEventArgs
                {
                    Position     = new ScreenPoint(prms.pos.X, prms.pos.Y),
                    ModifierKeys = prms.alt_state.GetModifiers()
                });
                break;

            case SciterXBehaviors.MOUSE_EVENTS.MOUSE_MOVE:
                ActualController.HandleMouseMove(this, new OxyMouseEventArgs
                {
                    Position     = new ScreenPoint(prms.pos.X, prms.pos.Y),
                    ModifierKeys = prms.alt_state.GetModifiers()
                });
                break;

            case SciterXBehaviors.MOUSE_EVENTS.MOUSE_DCLICK:
            case SciterXBehaviors.MOUSE_EVENTS.MOUSE_DOWN:
                OxyMouseButton button = OxyMouseButton.None;
                switch (prms.button_state)
                {
                case (uint)SciterXBehaviors.MOUSE_BUTTONS.MAIN_MOUSE_BUTTON:   button = OxyMouseButton.Left; break;

                case (uint)SciterXBehaviors.MOUSE_BUTTONS.PROP_MOUSE_BUTTON:   button = OxyMouseButton.Right; break;

                case (uint)SciterXBehaviors.MOUSE_BUTTONS.MIDDLE_MOUSE_BUTTON: button = OxyMouseButton.Middle; break;
                }

                ActualController.HandleMouseDown(this, new OxyMouseDownEventArgs
                {
                    ChangedButton = button,
                    ClickCount    = prms.cmd == SciterXBehaviors.MOUSE_EVENTS.MOUSE_DCLICK ? 2 : 1,
                    Position      = new ScreenPoint(prms.pos.X, prms.pos.Y),
                    ModifierKeys  = prms.alt_state.GetModifiers()
                });
                break;

            case SciterXBehaviors.MOUSE_EVENTS.MOUSE_UP:
                ActualController.HandleMouseUp(this, new OxyMouseEventArgs
                {
                    Position     = new ScreenPoint(prms.pos.X, prms.pos.Y),
                    ModifierKeys = prms.alt_state.GetModifiers()
                });
                break;

            case SciterXBehaviors.MOUSE_EVENTS.MOUSE_WHEEL:
                ActualController.HandleMouseWheel(this, new OxyMouseWheelEventArgs
                {
                    Delta        = (prms.button_state == 1 ? 1 : -1) * SystemInformation.MouseWheelScrollDelta,
                    Position     = new ScreenPoint(prms.pos.X, prms.pos.Y),
                    ModifierKeys = prms.alt_state.GetModifiers()
                });
                break;
            }
            return(false);
        }
Ejemplo n.º 23
0
        /// <summary>
        /// Raises the MouseButtonUp event.
        /// </summary>
        /// <param name="button">The button.</param>
        /// <param name="e">The <see cref="System.Windows.Input.MouseButtonEventArgs"/> instance containing the event data.</param>
        protected void OnMouseButtonUp(OxyMouseButton button, MouseButtonEventArgs e)
        {
            this.ReleaseMouseCapture();

            if (this.ActualModel != null)
            {
                var args = this.CreateMouseEventArgs(button, e);
                this.ActualModel.HandleMouseUp(this, args);
                if (args.Handled)
                {
                    return;
                }
            }

            if (this.mouseManipulator != null)
            {
                this.mouseManipulator.Completed(this.CreateManipulationEventArgs(e));
                e.Handled = true;
            }

            this.mouseManipulator = null;
        }
 public virtual void OnMouseDown(ScreenPoint pt, OxyMouseButton button, int clickCount, bool control, bool shift, bool alt)
 {
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Unbinds the specified mouse down gesture.
 /// </summary>
 /// <param name="controller">The controller.</param>
 /// <param name="mouseButton">The mouse button.</param>
 /// <param name="modifiers">The modifier keys.</param>
 /// <param name="clickCount">The click count.</param>
 public static void UnbindMouseDown(this IController controller, OxyMouseButton mouseButton, OxyModifierKeys modifiers = OxyModifierKeys.None, int clickCount = 1)
 {
     controller.Unbind(new OxyMouseDownGesture(mouseButton, modifiers, clickCount));
 }
Ejemplo n.º 26
0
        /// <summary>
        /// Called when a mouse button is pressed down.
        /// </summary>
        /// <param name="button">The button.</param>
        /// <param name="e">The <see cref="System.Windows.Input.MouseButtonEventArgs" /> instance containing the event data.</param>
        protected void OnMouseButtonDown(OxyMouseButton button, MouseButtonEventArgs e)
        {
            if (e.Handled)
            {
                return;
            }

            this.Focus();
            this.CaptureMouse();

            e.Handled = this.ActualController.HandleMouseDown(this, e.ToMouseDownEventArgs(button, this));
        }
Ejemplo n.º 27
0
 /// <summary>
 /// Binds the specified mouse button to the specified command.
 /// </summary>
 /// <param name="controller">The plot controller.</param>
 /// <param name="mouseButton">The mouse button.</param>
 /// <param name="command">A plot controller command that takes mouse event arguments.</param>
 public static void BindMouseDown(this IController controller, OxyMouseButton mouseButton, IViewCommand<OxyMouseDownEventArgs> command)
 {
     controller.Bind(new OxyMouseDownGesture(mouseButton), command);
 }
 /// <summary>
 /// Unbinds the specified mouse down gesture.
 /// </summary>
 /// <param name="controller">The controller.</param>
 /// <param name="mouseButton">The mouse button.</param>
 /// <param name="modifiers">The modifier keys.</param>
 /// <param name="clickCount">The click count.</param>
 public static void UnbindMouseDown(this IController controller, OxyMouseButton mouseButton, OxyModifierKeys modifiers = OxyModifierKeys.None, int clickCount = 1)
 {
     controller.Unbind(new OxyMouseDownGesture(mouseButton, modifiers, clickCount));
 }
Ejemplo n.º 29
0
 /// <summary>
 /// Binds the specified modifiers+mouse button+click count gesture to the specified command.
 /// </summary>
 /// <param name="controller">The plot controller.</param>
 /// <param name="mouseButton">The mouse button.</param>
 /// <param name="modifiers">The modifiers.</param>
 /// <param name="clickCount">The click count.</param>
 /// <param name="command">A plot controller command that takes mouse event arguments.</param>
 public static void BindMouseDown(this IController controller, OxyMouseButton mouseButton, OxyModifierKeys modifiers, int clickCount, IViewCommand<OxyMouseDownEventArgs> command)
 {
     controller.Bind(new OxyMouseDownGesture(mouseButton, modifiers, clickCount), command);
 }
 /// <summary>
 /// Binds the specified modifiers+mouse button+click count gesture to the specified command.
 /// </summary>
 /// <param name="controller">The plot controller.</param>
 /// <param name="mouseButton">The mouse button.</param>
 /// <param name="modifiers">The modifiers.</param>
 /// <param name="clickCount">The click count.</param>
 /// <param name="command">A plot controller command that takes mouse event arguments.</param>
 public static void BindMouseDown(this IController controller, OxyMouseButton mouseButton, OxyModifierKeys modifiers, int clickCount, IViewCommand <OxyMouseDownEventArgs> command)
 {
     controller.Bind(new OxyMouseDownGesture(mouseButton, modifiers, clickCount), command);
 }
Ejemplo n.º 31
0
 /// <summary>
 /// Converts <see cref="MouseButtonEventArgs" /> to <see cref="OxyMouseEventArgs" /> for a mouse down event.
 /// </summary>
 /// <param name="e">The <see cref="MouseButtonEventArgs" /> instance containing the event data.</param>
 /// <param name="button">The button.</param>
 /// <param name="relativeTo">The <see cref="UIElement" /> that the event is relative to.</param>
 /// <returns>A <see cref="OxyMouseDownEventArgs" /> containing the converted event arguments.</returns>
 public static OxyMouseDownEventArgs ToMouseDownEventArgs(this MouseButtonEventArgs e, OxyMouseButton button, UIElement relativeTo)
 {
     return new OxyMouseDownEventArgs
     {
         ChangedButton = button,
         ClickCount = 1,
         Position = e.GetPosition(relativeTo).ToScreenPoint(),
         ModifierKeys = Keyboard.GetModifierKeys()
     };
 }
Ejemplo n.º 32
0
 /// <summary>
 /// Converts <see cref="MouseButtonEventArgs" /> to <see cref="OxyMouseEventArgs" /> for a mouse up event.
 /// </summary>
 /// <param name="e">The <see cref="MouseButtonEventArgs" /> instance containing the event data.</param>
 /// <param name="button">The button.</param>
 /// <param name="relativeTo">The <see cref="UIElement" /> that the event is relative to.</param>
 /// <returns>A <see cref="OxyMouseEventArgs" /> containing the converted event arguments.</returns>
 public static OxyMouseEventArgs ToMouseUpEventArgs(this MouseButtonEventArgs e, OxyMouseButton button, UIElement relativeTo)
 {
     return new OxyMouseEventArgs
     {
         Position = e.GetPosition(relativeTo).ToScreenPoint(),
         ModifierKeys = Keyboard.GetModifierKeys()
     };
 }
Ejemplo n.º 33
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InputCommandBinding" /> class by a mouse gesture.
 /// </summary>
 /// <param name="mouseButton">The mouse button.</param>
 /// <param name="modifiers">The modifiers.</param>
 /// <param name="command">The command.</param>
 public InputCommandBinding(OxyMouseButton mouseButton, OxyModifierKeys modifiers, IViewCommand command)
     : this(new OxyMouseDownGesture(mouseButton, modifiers), command)
 {
 }