Uređivanje

Dijeli putem


MouseBinding Constructors

Definition

Initializes a new instance of the MouseBinding class.

Overloads

MouseBinding()

Initializes a new instance of the MouseBinding class.

MouseBinding(ICommand, MouseGesture)

Initializes a new instance of the MouseBinding class, using the specified command and mouse gesture.

MouseBinding()

Initializes a new instance of the MouseBinding class.

public:
 MouseBinding();
public MouseBinding ();
Public Sub New ()

See also

Applies to

MouseBinding(ICommand, MouseGesture)

Initializes a new instance of the MouseBinding class, using the specified command and mouse gesture.

public:
 MouseBinding(System::Windows::Input::ICommand ^ command, System::Windows::Input::MouseGesture ^ gesture);
public MouseBinding (System.Windows.Input.ICommand command, System.Windows.Input.MouseGesture gesture);
new System.Windows.Input.MouseBinding : System.Windows.Input.ICommand * System.Windows.Input.MouseGesture -> System.Windows.Input.MouseBinding
Public Sub New (command As ICommand, gesture As MouseGesture)

Parameters

command
ICommand

The command associated with the gesture.

gesture
MouseGesture

The gesture associated with the command.

Examples

The following example shows how to bind an ICommand with a MouseGesture using a MouseAction.

MouseGesture PasteCmdMouseGesture = new MouseGesture(
    MouseAction.MiddleClick, ModifierKeys.Alt);

ApplicationCommands.Paste.InputGestures.Add(PasteCmdMouseGesture);
Dim PasteCmdMouseGesture As New MouseGesture(MouseAction.MiddleClick, ModifierKeys.Alt)

ApplicationCommands.Paste.InputGestures.Add(PasteCmdMouseGesture)

See also

Applies to