FontWeightConverter
Converts named font weights or numeric OpenType weight-class strings to FontWeight.
Definition
Namespace:Telerik.WinControls.RichTextEditor.UI
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public sealed class FontWeightConverter : TypeConverter
Inheritance: objectTypeConverterFontWeightConverter
Inherited Members
Constructors
public FontWeightConverter()
Methods
Determines whether the specified source type can be converted to a font weight.
public override bool CanConvertFrom(ITypeDescriptorContext td, Type t)
The conversion context, which this converter does not use.
tTypeThe source type to test.
Returns:Overrides:
Parses a named font weight or an integer OpenType usWeightClass value from a string.
Named weights are matched without regard to case; numeric values must be between 1 and 999.
public override object ConvertFrom(ITypeDescriptorContext td, CultureInfo ci, object value)
The conversion context, which this converter does not use.
ciCultureInfoThe culture used to parse numeric strings.
valueobjectThe string representation of a named or numeric font weight.
Returns:The corresponding FontWeight.
Exceptions: NotSupportedExceptionvalue is null.
value is a non-null value that is not a string.
value is not a recognized weight name or integer.
A numeric weight is outside the range 1 through 999.
Overrides: