KeyBinding 建構函式

定義

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

多載

名稱 Description
KeyBinding()

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

KeyBinding(ICommand, KeyGesture)

使用指定的 KeyBindingICommand初始化該類別的新實例KeyGesture

KeyBinding(ICommand, Key, ModifierKeys)

使用指定的 和 KeyBinding 初始化該類別的新實例ICommand,該 並將轉換為 KeyModifierKeysKeyGesture

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 初始化該類別的新實例ICommand,該 並將轉換為 KeyModifierKeysKeyGesture

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的修飾符。

另請參閱

適用於