Share via


ImageConverter.CanConvertTo(ITypeDescriptorContext, Type) 方法

定義

判斷這個 ImageConverter 是否可以使用指定內容將 Image 轉換為指定型別的執行個體。

public:
 override bool CanConvertTo(System::ComponentModel::ITypeDescriptorContext ^ context, Type ^ destinationType);
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

提供格式內容的 ITypeDescriptorContext

destinationType
Type

Type,指定您想要轉換成的目的型別。

傳回

如果這個 ImageConverter 可以執行轉換,這個方法便會傳回 true,否則為 false

備註

只有當 等於位元組陣列或字串時sourceType,這個方法才會true傳回 。

適用於