MouseAction 枚举 
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指定定义鼠标所执行的操作的常量。
public enum class MouseAction
	[System.ComponentModel.TypeConverter(typeof(System.Windows.Input.MouseActionConverter))]
public enum MouseAction
	[<System.ComponentModel.TypeConverter(typeof(System.Windows.Input.MouseActionConverter))>]
type MouseAction = 
	Public Enum MouseAction
		- 继承
 
- 属性
 
字段
| 名称 | 值 | 说明 | 
|---|---|---|
| LeftClick | 1 | 单击鼠标左键。  | 
			
| LeftDoubleClick | 5 | 双击鼠标左键。  | 
			
| MiddleClick | 3 | 单击鼠标中键。  | 
			
| MiddleDoubleClick | 7 | 双击鼠标中键。  | 
			
| None | 0 | 不执行任何操作。  | 
			
| RightClick | 2 | 单击鼠标右键。  | 
			
| RightDoubleClick | 6 | 双击鼠标右键。  | 
			
| WheelClick | 4 | 旋转鼠标滚轮。  | 
			
示例
以下示例演示如何使用MouseAction枚举值构造 ,MouseGesture以及如何使用 MouseBinding将手势RoutedCommand绑定到 。
<MouseBinding MouseAction="MiddleClick"
              Command="ApplicationCommands.Cut" />
MouseGesture CutCmdMouseGesture = new MouseGesture(
    MouseAction.MiddleClick);
MouseBinding CutMouseBinding = new MouseBinding(
    ApplicationCommands.Cut,
    CutCmdMouseGesture);
// RootWindow is an instance of Window.
RootWindow.InputBindings.Add(CutMouseBinding);
Dim CutCmdMouseGesture As New MouseGesture(MouseAction.MiddleClick)
Dim CutMouseBinding As New MouseBinding(ApplicationCommands.Cut, CutCmdMouseGesture)
' RootWindow is an instance of Window.
RootWindow.InputBindings.Add(CutMouseBinding)
	注解
              MouseAction枚举指定对应于鼠标执行的操作的常量,例如 RightClick 和 RightDoubleClick。
              MouseAction 可与 一起使用, MouseGesture 以创建可使用 绑定到命令的 MouseBinding输入手势。 有关命令的详细信息,请参阅 命令概述。