ImageFormatConverter.CanConvertTo(ITypeDescriptorContext, Type) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
會取得一個值,表示此轉換器是否能利用上下文將物件轉換為指定的目的類型。
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 個 A 指定了這種類型轉換的上下文。
- destinationType
- Type
那 Type 代表你想轉換這個 ImageFormat 物件的類型。
傳回
如果該物件能執行轉換,此方法會回傳 true 。
備註
這些影像 ImageFormatConverter 會依類別 ImageFormat 中指定的方式轉換至已知影像格式。