GridLengthConverter.CanConvertTo(ITypeDescriptorContext, Type) 方法

定义

确定是否可将 GridLength 的实例转换成不同类型。Determines whether an instance of GridLength can be converted to a different type.

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

参数

typeDescriptorContext
ITypeDescriptorContext

描述类型的上下文信息。Describes the context information of a type.

destinationType
Type

正被计算用于转换的此 GridLength 实例的所需类型。The desired type that this instance of GridLength is being evaluated for conversion.

返回

如果转换器可以将此 GridLength 实例转换为指定类型,则为 true;否则为 falsetrue if the converter can convert this instance of GridLength to the specified type; otherwise, false.

注解

GridLengthConverter 支持与以下类型的转换: StringDecimalSingleDoubleInt16Int32Int64UInt16UInt32UInt64GridLengthConverter supports conversion to and from the following types: String, Decimal, Single, Double, Int16, Int32, Int64, UInt16, UInt32, UInt64.

适用于

另请参阅