MouseBinding.MouseAction Property


Возвращает или задает объект MouseAction, связанный с данным объектом MouseBinding.Gets or sets the MouseAction associated with this MouseBinding.

 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. Значение по умолчанию — None.The default is None.


В следующем примере показано, как создать привязку между MouseAction и RoutedCommand.The following example shows how to create a binding between a MouseAction and a RoutedCommand.

<MouseBinding MouseAction="MiddleClick"
              Command="ApplicationCommands.Cut" />


В отличие от KeyGesture, MouseGesture не нужно связывать с клавишей-модификатором.Unlike a KeyGesture, a MouseGesture does not need to be associated with a modifier key. Таким образом, MouseAction сама по себе, например MiddleClick, может быть допустимым MouseGesture.So a MouseAction by itself, such as MiddleClick, can be a valid MouseGesture.

Applies to

See also