Converts TableWidthUnit values to and from their serialized string form.
Definition
Namespace:Telerik.WinForms.Documents.Model
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class TableWidthUnitConverter : TypeConverter
Inheritance: objectTypeConverterTableWidthUnitConverter
Inherited Members
Constructors
public TableWidthUnitConverter()
Methods
Determines whether this converter can read values of the specified source type.
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
The type descriptor context, if supplied.
sourceTypeTypeThe source type to check.
Returns:Overrides:
Determines whether this converter can write values to the specified destination type.
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
The type descriptor context, if supplied.
destinationTypeTypeThe destination type to check.
Returns:Overrides:
Parses Auto or a type/value pair, such as Percent,50; numeric values use invariant culture.
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
The type descriptor context, if supplied.
cultureCultureInfoIgnored; numeric values are parsed using invariant culture.
valueobjectThe string to parse. An empty string produces null.
Returns:The parsed TableWidthUnit, or null for an empty string.
Exceptions: ArgumentExceptionThe string is not Auto or a valid type/value pair.
Overrides:
Formats a width unit as Auto or a type/value pair; numeric values use invariant culture.
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
The type descriptor context, if supplied.
cultureCultureInfoIgnored; numeric values are formatted using invariant culture.
valueobjectThe width unit to format, or null.
destinationTypeTypeThe requested output type; this converter supports string.
Returns:An empty string for null, otherwise the serialized width unit.
Overrides: