DependencyPropertyConverter.CanConvertTo(ITypeDescriptorContext, Type) 方法

定义

确定能否将 DependencyProperty 的实例转换为指定类型。Determines whether an instance of DependencyProperty can be converted to the specified type.

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

一种格式上下文,可提供有关要从中调用此转换器的环境的信息。A format context that provides information about the environment from which this converter is being invoked.

destinationType
Type

要进行计算以供转换的类型。The type being evaluated for conversion.

返回

如果此转换器能够执行该操作,则为 true;否则为 falsetrue if this converter can perform the operation; otherwise, false.

注解

此实现始终返回 falseThis implementation always returns false.

适用于