語言

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 A 指定你想轉換成哪種類型。

傳回

若能true完成轉換,則回傳ImageConverter此方法;否則,。 false

備註

此方法僅在 true 等於位元組陣列或字串時回傳sourceType。

適用於