LinkConverter.CanConvertFrom(ITypeDescriptorContext, Type) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
擷取一個值,判斷是否 LinkConverter 能將具有指定上下文與來源類型的物件轉換為原生型態 LinkConverter。
public:
override bool CanConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ context, Type ^ sourceType);
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, Type sourceType);
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, Type sourceType);
override this.CanConvertFrom : System.ComponentModel.ITypeDescriptorContext * Type -> bool
Public Overrides Function CanConvertFrom (context As ITypeDescriptorContext, sourceType As Type) As Boolean
參數
- context
- ITypeDescriptorContext
提供 ITypeDescriptorContext 關於要轉換物件的上下文資訊。
- sourceType
- Type
要轉換的物件類型。
傳回
true 若能 LinkConverter 轉換指定物件;否則, false。