KeyGestureConverter.CanConvertFrom(ITypeDescriptorContext, Type) 方法

定義

使用指定的內容,判斷所指定型別的物件是否可轉換成 KeyGesture 的執行個體。Determines whether an object of the specified type can be converted to an instance of KeyGesture, using the specified context.

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

格式內容,提供正在叫用此轉換器之環境的相關資訊。A format context that provides information about the environment from which this converter is being invoked.

sourceType
Type

正在評估以進行轉換的型別。The type being evaluated for conversion.

傳回

如果 sourceType 的型別為 String 則為 true,否則為 falsetrue if sourceType is type String; otherwise, false.

適用於