FontUnitConverter.CanConvertFrom(ITypeDescriptorContext, Type) 方法

定义

确定数据类型是否可以转换为 FontUnit.

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

参数

context
ITypeDescriptorContext

一个 ITypeDescriptorContext 实现的对象,该对象提供有关类型转换器上下文的信息。

sourceType
Type

表示要检查的数据类型的 A Type

返回

如果参数指定的 数据类型可以转换为 a,则为 />;否则为

注解

CanConvertFrom使用该方法确定参数指定的sourceType数据类型是否可以转换为 。FontUnit

注释

仅当为 sourceTypetrue 时String,此方法才会返回 true。 此转换器可转换为 FontUnit 的唯一类型是 String

适用于

另请参阅