KeyBinding 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 KeyBinding 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| KeyBinding() |
初始化 KeyBinding 類別的新執行個體。 |
| KeyBinding(ICommand, KeyGesture) |
使用指定的 KeyBinding 和 ICommand初始化該類別的新實例KeyGesture。 |
| KeyBinding(ICommand, Key, ModifierKeys) |
使用指定的 和 KeyBinding 初始化該類別的新實例ICommand,該 並將轉換為 Key。ModifierKeysKeyGesture |
KeyBinding()
初始化 KeyBinding 類別的新執行個體。
public:
KeyBinding();
public KeyBinding();
Public Sub New ()
另請參閱
- KeyBinding
- MouseBinding
- RoutedCommand
- CommandBinding
- KeyGesture
- MouseGesture
- InputGesture
- InputBinding
適用於
KeyBinding(ICommand, KeyGesture)
使用指定的 KeyBinding 和 ICommand初始化該類別的新實例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的鍵組合。
例外狀況
command 或 gesture 為 null。
另請參閱
- KeyBinding
- MouseBinding
- RoutedCommand
- CommandBinding
- KeyGesture
- MouseGesture
- InputGesture
- InputBinding
適用於
KeyBinding(ICommand, Key, ModifierKeys)
使用指定的 和 KeyBinding 初始化該類別的新實例ICommand,該 並將轉換為 Key。ModifierKeysKeyGesture
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的修飾符。
另請參閱
- KeyBinding
- MouseBinding
- RoutedCommand
- CommandBinding
- KeyGesture
- MouseGesture
- InputGesture
- InputBinding