KeyBinding Constructor (ICommand, KeyGesture)

 

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

Namespace:   System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)

public KeyBinding(
	ICommand command,
	KeyGesture gesture
)

Parameters

command
Type: System.Windows.Input.ICommand

The command to associate with gesture.

gesture
Type: System.Windows.Input.KeyGesture

The key combination to associate with command.

Exception Condition
ArgumentNullException

command or gesture is null.

.NET Framework
Available since 3.0
Return to top
Show: