MouseGesture.MouseAction Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the MouseAction associated with this gesture.
public:
property System::Windows::Input::MouseAction MouseAction { System::Windows::Input::MouseAction get(); void set(System::Windows::Input::MouseAction value); };
public System.Windows.Input.MouseAction MouseAction { get; set; }
member this.MouseAction : System.Windows.Input.MouseAction with get, set
Public Property MouseAction As MouseAction
Property Value
The mouse action associated with this gesture. The default value is None.
Examples
The following example shows to create a MouseGesture and associate it with a RoutedCommand through a MouseBinding.
MouseGesture OpenCmdMouseGesture = new MouseGesture();
OpenCmdMouseGesture.MouseAction = MouseAction.WheelClick;
OpenCmdMouseGesture.Modifiers = ModifierKeys.Control;
MouseBinding OpenCmdMouseBinding = new MouseBinding();
OpenCmdMouseBinding.Gesture = OpenCmdMouseGesture;
OpenCmdMouseBinding.Command = ApplicationCommands.Open;
this.InputBindings.Add(OpenCmdMouseBinding);
Dim OpenCmdMouseGesture As New MouseGesture()
OpenCmdMouseGesture.MouseAction = MouseAction.WheelClick
OpenCmdMouseGesture.Modifiers = ModifierKeys.Control
Dim OpenCmdMouseBinding As New MouseBinding()
OpenCmdMouseBinding.Gesture = OpenCmdMouseGesture
OpenCmdMouseBinding.Command = ApplicationCommands.Open
Me.InputBindings.Add(OpenCmdMouseBinding)
Remarks
Unlike a KeyGesture, a MouseAction does not have to be paired with ModifierKeys in order to be a valid MouseGesture.
Applies to
See also
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.