Chỉnh sửa

KeyGestureConverter Class

Definition

Converts a KeyGesture object to and from other types.

public ref class KeyGestureConverter : System::ComponentModel::TypeConverter
public class KeyGestureConverter : System.ComponentModel.TypeConverter
type KeyGestureConverter = class
    inherit TypeConverter
Public Class KeyGestureConverter
Inherits TypeConverter
Inheritance
KeyGestureConverter

Remarks

The KeyGestureConverter class only converts an instance KeyGesture to and from a String.

The KeyGestureConverter converts to and from a String using the "+" character as the delimiter between the modifier keys and the key. For example, the string Control+A would be converted into a KeyGesture with a Modifiers property equal to Control and Key property equal to A.

Constructors

Name Description
KeyGestureConverter()

Initializes a new instance of the KeyGesture class.

Methods

Name Description
CanConvertFrom(ITypeDescriptorContext, Type)

Determines whether an object of the specified type can be converted to an instance of KeyGesture, using the specified context.

CanConvertTo(ITypeDescriptorContext, Type)

Determines whether an instance of KeyGesture can be converted to the specified type, using the specified context.

ConvertFrom(ITypeDescriptorContext, CultureInfo, Object)

Attempts to convert the specified object to a KeyGesture, using the specified context.

ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type)

Attempts to convert a KeyGesture to the specified type, using the specified context.

Applies to