MouseBinding Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om