Class
KeyBinding

Binds a KeyGesture to a RoutedCommand (or another ICommand implementation).

Definition

Namespace:Telerik.UI.Xaml.Controls

Assembly:Telerik.WinUI.Controls.dll

Syntax:

cs-api-definition
public class KeyBinding : InputBinding, ICommandSource

Inheritance: objectInputBindingKeyBinding

Implements: ICommandSource

Inherited Members InputBinding.CommandInputBinding.CommandParameterInputBinding.CommandTarget

Constructors

KeyBinding()

Initializes a new instance of the KeyBinding class.

Declaration

cs-api-definition
public KeyBinding()

KeyBinding(ICommand, KeyGesture)

Initializes a new instance of the KeyBinding class.

Declaration

cs-api-definition
public KeyBinding(ICommand command, KeyGesture gesture)

Parameters

command

ICommand

The command.

gesture

KeyGesture

The gesture.

KeyBinding(ICommand, VirtualKey, VirtualKeyModifiers)

Initializes a new instance of the KeyBinding class.

Declaration

cs-api-definition
public KeyBinding(ICommand command, VirtualKey key, VirtualKeyModifiers modifiers)

Parameters

command

ICommand

The command.

key

VirtualKey

The key.

modifiers

VirtualKeyModifiers

The modifiers.

Properties

Gesture

Gets or sets the InputGesture associated with this input binding.

Declaration

cs-api-definition
[TypeConverter(typeof(KeyGestureConverter))]
public override InputGesture Gesture { get; set; }

Property Value

InputGesture

The gesture.

Overrides InputBinding.Gesture

Key

Gets or sets the Key of the KeyGesture associated with this KeyBinding.

Declaration

cs-api-definition
public VirtualKey Key { get; set; }

Property Value

VirtualKey

The key.

Modifiers

Gets or sets the ModifierKeys of the KeyGesture associated with this KeyBinding.

Declaration

cs-api-definition
public VirtualKeyModifiers Modifiers { get; set; }

Property Value

VirtualKeyModifiers

The modifiers.