ImageConverter.CanConvertTo(ITypeDescriptorContext, Type) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
判斷是否 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 。
傳回
若能true完成轉換,則回傳ImageConverter此方法;否則,。 false
備註
此方法僅在 true 等於位元組陣列或字串時回傳sourceType。