.NET Framework (current version)
Specifies constants that define actions performed by the mouse.
PresentationCore (in PresentationCore.dll)
public enum MouseAction
Member name Description LeftClick
A left mouse button click.
A left mouse button double-click.
A middle mouse button click.
A middle mouse button double-click.
A right mouse button click.
A right mouse button double-click.
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.
.NET Framework Available since 3.0 Return to top