MouseBinding.MouseAction 屬性

定義

取得或設定與這個 MouseAction 關聯的 MouseBindingGets or sets the MouseAction associated with this MouseBinding.

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

屬性值

滑鼠動作。The mouse action. 預設為 NoneThe default is None.

範例

下列範例顯示如何在 MouseActionRoutedCommand之間建立系結。The following example shows how to create a binding between a MouseAction and a RoutedCommand.

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

備註

不同于 KeyGestureMouseGesture 不需要與輔助按鍵產生關聯。Unlike a KeyGesture, a MouseGesture does not need to be associated with a modifier key. 因此,MouseAction 本身(例如 MiddleClick)可以是有效的 MouseGestureSo a MouseAction by itself, such as MiddleClick, can be a valid MouseGesture.

適用於

另請參閱