Modifica

Condividi tramite


GridLengthConverter.ConvertTo Method

Definition

Attempts to convert an instance of GridLength to a specified type.

public:
 override System::Object ^ ConvertTo(System::ComponentModel::ITypeDescriptorContext ^ typeDescriptorContext, System::Globalization::CultureInfo ^ cultureInfo, System::Object ^ value, Type ^ destinationType);
[System.Security.SecurityCritical]
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext typeDescriptorContext, System.Globalization.CultureInfo cultureInfo, object value, Type destinationType);
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext typeDescriptorContext, System.Globalization.CultureInfo cultureInfo, object value, Type destinationType);
[<System.Security.SecurityCritical>]
override this.ConvertTo : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj * Type -> obj
override this.ConvertTo : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj * Type -> obj
Public Overrides Function ConvertTo (typeDescriptorContext As ITypeDescriptorContext, cultureInfo As CultureInfo, value As Object, destinationType As Type) As Object

Parameters

typeDescriptorContext
ITypeDescriptorContext

Describes the context information of a type.

cultureInfo
CultureInfo

Cultural specific information that should be respected during conversion.

value
Object

The instance of GridLength to convert.

destinationType
Type

The type that this instance of GridLength is converted to.

Returns

The object that is created from the converted instance of GridLength.

Attributes

Exceptions

destinationType is not one of the valid types for conversion.

value is null.

Remarks

GridLengthConverter supports conversion to and from the following types: String, Decimal, Single, Double, Int16, Int32, Int64, UInt16, UInt32, UInt64.

Applies to

See also