FontUnitConverter.CanConvertFrom(ITypeDescriptorContext, Type) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
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.