GridLengthConverter.CanConvertFrom(ITypeDescriptorContext, Type) 方法

定義

判斷類別是否可以從指定的型別轉換為 GridLength 的執行個體。

public:
 override bool CanConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ typeDescriptorContext, Type ^ sourceType);
public override bool CanConvertFrom (System.ComponentModel.ITypeDescriptorContext typeDescriptorContext, Type sourceType);
override this.CanConvertFrom : System.ComponentModel.ITypeDescriptorContext * Type -> bool
Public Overrides Function CanConvertFrom (typeDescriptorContext As ITypeDescriptorContext, sourceType As Type) As Boolean

參數

typeDescriptorContext
ITypeDescriptorContext

描述類型的內容資訊。

sourceType
Type

正在評估以進行轉換之來源的型別。

傳回

如果轉換子可從指定的型別轉換成 GridLength 的執行個體則為 true,否則為 false

備註

GridLengthConverter支援從下列類型來回轉換: StringDecimalSingleDoubleUInt64Int16UInt32Int32Int64UInt16

適用於

另請參閱