RoutedCommand.InputGestures 属性

定义

获取与此命令关联的 InputGesture 对象的集合。

public:
 property System::Windows::Input::InputGestureCollection ^ InputGestures { System::Windows::Input::InputGestureCollection ^ get(); };
public System.Windows.Input.InputGestureCollection InputGestures { get; }
member this.InputGestures : System.Windows.Input.InputGestureCollection
Public ReadOnly Property InputGestures As InputGestureCollection

属性值

输入笔势。

示例

以下示例演示如何将新的 MouseGesture 添加到 RoutedCommand

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)

适用于

另请参阅