แก้ไข

แชร์ผ่าน


FontUnitConverter.CanConvertFrom(ITypeDescriptorContext, Type) Method

Definition

Determines whether a data type can be converted to a FontUnit.

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

Parameters

context
ITypeDescriptorContext

A ITypeDescriptorContext implemented object that provides information about the context of a type converter.

sourceType
Type

A Type that represents the data type to check.

Returns

true if the data type specified by the sourceType parameter can be converted to a FontUnit; otherwise, false.

Remarks

Use the CanConvertFrom method to determine whether the data type specified by the sourceType parameter can be converted to a FontUnit.

Note

This method will return true only if the sourceType is String. The only type this converter can convert into FontUnit is String.

Applies to

See also