Share via


FontFamilyConverter.CanConvertTo(ITypeDescriptorContext, Type) 方法

定義

判斷 FontFamily 的執行個體是否可轉換成不同型別。

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

參數

context
ITypeDescriptorContext

描述類型的內容資訊。

destinationType
Type

FontFamily 的這個執行個體針對轉換進行評估的所需型別。

傳回

如果轉換子可將 FontFamily 的這個執行個體轉換成指定的型別則為 true,否則為 false

備註

只有在 contextFontFamily 型別且 destinationTypeString 型別時,才能進行轉換。 此外,的 Sourcecontext 屬性不能是 null 或等於 Empty ,它會識別 context 為匿名 FontFamily

適用於