KeyGestureConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type) KeyGestureConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type) KeyGestureConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type) KeyGestureConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type) Method

Definición

Intenta convertir una instancia de KeyGesture en el tipo especificado usando el contexto indicado.Attempts to convert a KeyGesture to the specified type, using the specified context.

public:
 override System::Object ^ ConvertTo(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ culture, System::Object ^ value, Type ^ destinationType);
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType);
override this.ConvertTo : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj * Type -> obj
Public Overrides Function ConvertTo (context As ITypeDescriptorContext, culture As CultureInfo, value As Object, destinationType As Type) As Object

Parámetros

context
ITypeDescriptorContext ITypeDescriptorContext ITypeDescriptorContext ITypeDescriptorContext

Contexto de formato que proporciona información sobre el entorno desde el que se invoca este convertidor.A format context that provides information about the environment from which this converter is being invoked.

culture
CultureInfo CultureInfo CultureInfo CultureInfo

Información específica de la referencia cultural.Culture specific information.

value
Object Object Object Object

Objeto que se va a convertir.The object to convert.

destinationType
Type Type Type Type

Tipo en el que se va a convertir el objeto.The type to convert the object to.

Devoluciones

El objeto convertido o una cadena vacía si value es null.The converted object, or an empty string if value is null.

Excepciones

value no se puede convertir.value cannot be converted.

Comentarios

destinationTypedebe ser String.destinationType must be String.

Convierte en y String desde mediante la clave "+" como delimitador entre las teclas modificadoras y la clave. KeyGestureConverterThe KeyGestureConverter converts to and from a String using the "+" key as the delimiter between the modifier keys and the key. Por ejemplo, un KeyGesture con una Modifiers propiedad igual a Control y Key la propiedad igual A a se convertiría en la Control+Acadena.For example, a KeyGesture with a Modifiers property equal to Control and Key property equal to A would be converted into the string Control+A.

Se aplica a