MouseAction MouseAction MouseAction MouseAction Enum

Definición

Especifica constantes que definen las acciones realizadas por el mouse.Specifies constants that define actions performed by the mouse.

public enum class MouseAction
[System.ComponentModel.TypeConverter(typeof(System.Windows.Input.MouseActionConverter))]
public enum MouseAction
type MouseAction = 
Public Enum MouseAction
Herencia
Atributos

Campos

LeftClick LeftClick LeftClick LeftClick 1

Clic con el botón primario del mouse.A left mouse button click.

LeftDoubleClick LeftDoubleClick LeftDoubleClick LeftDoubleClick 5

Doble clic con el botón primario del mouse.A left mouse button double-click.

MiddleClick MiddleClick MiddleClick MiddleClick 3

Clic con el botón central del mouse.A middle mouse button click.

MiddleDoubleClick MiddleDoubleClick MiddleDoubleClick MiddleDoubleClick 7

Doble clic con el botón central del mouse.A middle mouse button double-click.

None None None None 0

No se requiere ninguna acción.No action.

RightClick RightClick RightClick RightClick 2

Clic con el botón secundario del mouse.A right mouse button click.

RightDoubleClick RightDoubleClick RightDoubleClick RightDoubleClick 6

Doble clic con el botón secundario del mouse.A right mouse button double-click.

WheelClick WheelClick WheelClick WheelClick 4

Rotación de la rueda del mouse.A mouse wheel rotation.

Ejemplos

El ejemplo siguiente muestra cómo construir un MouseGesture mediante un MouseAction y cómo enlazar el gesto para un RoutedCommand mediante un MouseBinding.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(
    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)

Comentarios

El MouseAction enumeración especifica las constantes que se corresponden con las acciones realizadas por el mouse, como clic y RightDoubleClick.The MouseAction enumeration specifies constants which correspond to actions performed by the mouse, such as RightClick and RightDoubleClick.

RightClick se puede usar con un MouseGesture para crear un gesto de entrada que se puede enlazar a un comando mediante un MouseBinding.RightClick can be used with a MouseGesture to create a input gesture which can be bound to a command using a MouseBinding. Para obtener más información acerca de los comandos, consulte el información general sobre comandos.For more information about commanding, see the Commanding Overview.

Se aplica a

Consulte también: