Class KeyGesture
Defines a keyboard combination that can be used to invoke a command.
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.dll
Syntax
public class KeyGesture : InputGesture
Constructors
KeyGesture(Key)
Initializes a new instance of the KeyGesture class.
Declaration
public KeyGesture(Key key)
Parameters
System.Windows.Input.Key
key
The key. |
KeyGesture(Key, ModifierKeys)
Initializes a new instance of the KeyGesture class.
Declaration
public KeyGesture(Key key, ModifierKeys modifiers)
Parameters
System.Windows.Input.Key
key
The key. |
System.Windows.Input.ModifierKeys
modifiers
The modifiers. |
KeyGesture(Key, ModifierKeys, String)
Initializes a new instance of the KeyGesture class.
Declaration
public KeyGesture(Key key, ModifierKeys modifiers, string displayString)
Parameters
System.Windows.Input.Key
key
The key. |
System.Windows.Input.ModifierKeys
modifiers
The modifiers. |
System.String
displayString
The display string. |
Properties
DisplayString
Gets a string representation of this KeyGesture.
Declaration
public string DisplayString { get; }
Property Value
System.String
The display string. |
Key
Gets the key associated with this KeyGesture.
Declaration
public Key Key { get; }
Property Value
System.Windows.Input.Key
The key. |
Modifiers
Gets the modifier keys associated with this KeyGesture.
Declaration
public ModifierKeys Modifiers { get; }
Property Value
System.Windows.Input.ModifierKeys
The modifiers. |
Methods
GetDisplayStringForCulture(CultureInfo)
Returns a string that can be used to display the KeyGesture.
Declaration
public string GetDisplayStringForCulture(CultureInfo culture)
Parameters
System.Globalization.CultureInfo
culture
|
Returns
System.String
|
Matches(Object, RoutedEventArgs)
When overridden in a derived class, determines whether the specified InputGesture matches the input associated with the specified InputEventArgs object.
Declaration
public override bool Matches(object targetElement, RoutedEventArgs inputEventArgs)
Parameters
System.Object
targetElement
The target element. |
System.Windows.RoutedEventArgs
inputEventArgs
The System.Windows.RoutedEventArgs instance containing the event data. |
Returns
System.Boolean
|