KeyBinding 构造函数

定义

初始化 KeyBinding 类的新实例。

重载

名称 说明
KeyBinding()

初始化 KeyBinding 类的新实例。

KeyBinding(ICommand, KeyGesture)

使用指定的KeyBindingICommand. 初始化类的新实例KeyGesture

KeyBinding(ICommand, Key, ModifierKeys)

使用指定的和指定的KeyBindingICommand实例初始化类的新实例,该Key实例ModifierKeys将转换为一个 KeyGesture

KeyBinding()

初始化 KeyBinding 类的新实例。

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

另请参阅

适用于

KeyBinding(ICommand, KeyGesture)

使用指定的KeyBindingICommand. 初始化类的新实例KeyGesture

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

参数

command
ICommand

要与之 gesture关联的命令。

gesture
KeyGesture

要与之 command关联的键组合。

例外

commandgesturenull.

另请参阅

适用于

KeyBinding(ICommand, Key, ModifierKeys)

使用指定的和指定的KeyBindingICommand实例初始化类的新实例,该Key实例ModifierKeys将转换为一个 KeyGesture

public:
 KeyBinding(System::Windows::Input::ICommand ^ command, System::Windows::Input::Key key, System::Windows::Input::ModifierKeys modifiers);
public KeyBinding(System.Windows.Input.ICommand command, System.Windows.Input.Key key, System.Windows.Input.ModifierKeys modifiers);
new System.Windows.Input.KeyBinding : System.Windows.Input.ICommand * System.Windows.Input.Key * System.Windows.Input.ModifierKeys -> System.Windows.Input.KeyBinding
Public Sub New (command As ICommand, key As Key, modifiers As ModifierKeys)

参数

command
ICommand

要调用的命令。

key
Key

要与之 command关联的键。

modifiers
ModifierKeys

要与 . 关联的 command修饰符。

另请参阅

适用于