Rediger

Del via


GridLengthConverter.CanConvertFrom(ITypeDescriptorContext, Type) Method

Definition

Determines whether a class can be converted from a given type to an instance of GridLength.

public:
 override bool CanConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ typeDescriptorContext, Type ^ sourceType);
public override bool CanConvertFrom (System.ComponentModel.ITypeDescriptorContext typeDescriptorContext, Type sourceType);
override this.CanConvertFrom : System.ComponentModel.ITypeDescriptorContext * Type -> bool
Public Overrides Function CanConvertFrom (typeDescriptorContext As ITypeDescriptorContext, sourceType As Type) As Boolean

Parameters

typeDescriptorContext
ITypeDescriptorContext

Describes the context information of a type.

sourceType
Type

The type of the source that is being evaluated for conversion.

Returns

true if the converter can convert from the specified type to an instance of GridLength; otherwise, false.

Remarks

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

Applies to

See also