Table of Contents

Class KeyGesture

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Contains key and key modifiers combination.

[TypeConverter(typeof(KeyGestureConverter))]
public class KeyGesture : InputGesture, IBaseObject
Inheritance
KeyGesture
Implements

Constructors

KeyGesture(Key)

Initializes a new instance of the KeyGesture class with key value.

KeyGesture(Key, ModifierKeys)

Initializes a new instance of the KeyGesture class with key and key modifiers values.

KeyGesture(Key, ModifierKeys, bool)

Initializes a new instance of the KeyGesture class.

KeyGesture(Key, ModifierKeys, string)

Initializes a new instance of the KeyGesture class with key, key modifiers and display string values.

KeyGesture(Key, ModifierKeys, string, bool)

Initializes a new instance of the KeyGesture class.

Properties

DisplayString

Gets display string for the end user.

Key

Gets key asociated with this KeyGesture.

Modifiers

Gets key modifiers asociated with this KeyGesture (Alt, Control, Shift, etc.)

Methods

GetDisplayStringForCulture(CultureInfo)

Returns a string that can be used to display the KeyGesture. If the DisplayString was set by the constructor, it is returned. Otherwise a suitable string is created from the Key and Modifiers, with any conversions being governed by the given CultureInfo.

HasKey(Key, ModifierKeys)

Gets whether Key and Modifiers are equal to the values specified in the parameters.

IsDefinedKey(Key)

Checks for valid enum, as any int can be casted to the enum.

IsValid()

Checks whether Key and Modifiers combination is valid.

IsValid(Key, ModifierKeys)

Checks whether key and key modifiers combination is valid.

ToString()

Returns a string that represents the current object.

Operators

implicit operator KeyGesture(string)

Implicit operator convertion from the string to the KeyGesture.