KeyBinding 建構函式

定義

初始化 KeyBinding 類別的新執行個體。

多載

KeyBinding()

初始化 KeyBinding 類別的新執行個體。

KeyBinding(ICommand, KeyGesture)

使用指定的 KeyBindingICommand,初始化 KeyGesture 類別的新執行個體。

KeyBinding(ICommand, Key, ModifierKeys)

使用指定的 KeyBinding,和指定的 ICommandKey (將轉換為 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)

使用指定的 KeyBinding,和指定的 ICommandKey (將轉換為 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 關聯的輔助按鍵。

另請參閱

適用於