InputBinding Class
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
'Declaration Public Class InputBinding Inherits DependencyObject Implements ICommandSource 'Usage Dim instance As InputBinding
public class InputBinding extends DependencyObject implements ICommandSource
public class InputBinding extends DependencyObject implements ICommandSource
You cannot use this managed class in XAML.
When the InputGesture associated with a InputBinding is performed, the ICommand associated with the InputBinding is executed.
An InputBinding can be defined on a specific object or at the class level by registering a RegisterClassInputBinding with the CommandManager.
An InputBinding can be defined on a specific object or at the class level by registering a RegisterClassInputBinding on the CommandManager class.
The following example shows how to use a KeyBinding to bind a KeyGesture to the Open command. When the key gesture is performed, the open command is invoked.
<Window.InputBindings> <KeyBinding Key="B" Modifiers="Control" Command="ApplicationCommands.Open" /> </Window.InputBindings>
KeyGesture OpenKeyGesture = new KeyGesture( Key.B, ModifierKeys.Control); KeyBinding OpenCmdKeybinding = new KeyBinding( ApplicationCommands.Open, OpenKeyGesture); this.InputBindings.Add(OpenCmdKeybinding);
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Input.InputBinding
System.Windows.Input.KeyBinding
System.Windows.Input.MouseBinding
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.