This documentation is archived and is not being maintained.

MouseAction Enumeration

Specifies constants that define actions performed by the mouse.

Namespace:  System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)

<TypeConverterAttribute(GetType(MouseActionConverter))> _
Public Enumeration MouseAction
Dim instance As MouseAction
<object property="enumerationMemberName" .../>

Member nameDescription
NoneNo action.
LeftClickA left mouse button click.
RightClickA right mouse button click.
MiddleClickA middle mouse button click.
WheelClickA mouse wheel rotation.
LeftDoubleClickA left mouse button double-click.
RightDoubleClickA right mouse button double-click.
MiddleDoubleClickA middle mouse button double-click.

The MouseAction enumeration specifies constants which correspond to actions performed by the mouse, such as RightClick and RightDoubleClick.

MouseAction can be used with a MouseGesture to create a input gesture which can be bound to a command using a MouseBinding. For more information about commanding, see the Commanding Overview.

The following example shows how to construct a MouseGesture using a MouseAction and how to bind the gesture to a RoutedCommand using a MouseBinding.

<MouseBinding MouseAction="MiddleClick"
              Command="ApplicationCommands.Cut" />
MouseGesture CutCmdMouseGesture = new MouseGesture(

MouseBinding CutMouseBinding = new MouseBinding(

// RootWindow is an instance of Window.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0