語言

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

Type A 代表要檢查的資料型態。

傳回

true 若參數指定 sourceType 的資料型態可轉換為 FontUnit;否則, false。

備註

使用此 CanConvertFrom 方法判斷參數指定的 sourceType 資料型別是否能轉換為 FontUnit。

Note

此方法僅 sourceType 在 為 時 String返回真。 此轉換器唯一能轉換成 FontUnit 的類型是 String。

適用於

另請參閱