Rediger

Del via


KeyBinding Constructors

Definition

Initializes a new instance of the KeyBinding class.

Overloads

KeyBinding()

Initializes a new instance of the KeyBinding class.

KeyBinding(ICommand, KeyGesture)

Initializes a new instance of the KeyBinding class using the specified ICommand and KeyGesture.

KeyBinding(ICommand, Key, ModifierKeys)

Initializes a new instance of the KeyBinding class using the specified ICommand and the specified Key and ModifierKeys which will be converted into a KeyGesture.

KeyBinding()

Initializes a new instance of the KeyBinding class.

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

See also

Applies to

KeyBinding(ICommand, KeyGesture)

Initializes a new instance of the KeyBinding class using the specified ICommand and 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)

Parameters

command
ICommand

The command to associate with gesture.

gesture
KeyGesture

The key combination to associate with command.

Exceptions

command or gesture is null.

See also

Applies to

KeyBinding(ICommand, Key, ModifierKeys)

Initializes a new instance of the KeyBinding class using the specified ICommand and the specified Key and ModifierKeys which will be converted into a 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)

Parameters

command
ICommand

The command to invoke.

key
Key

The key to be associated with command.

modifiers
ModifierKeys

The modifiers to be associated with command.

See also

Applies to