Converts TableBorders values to and from their compact string representation.
Definition
Namespace:Telerik.WinForms.Documents.Model
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class TableBordersConverter : TypeConverter
Inheritance: objectTypeConverterTableBordersConverter
Inherited Members
Constructors
public TableBordersConverter()
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 a border record or six edge records. Each record contains thickness, style, and color, optionally followed by theme color, shade, and tint.
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
The type descriptor context, if supplied.
cultureCultureInfoIgnored; border thickness is parsed using invariant culture.
valueobjectThe string to parse. Records may be separated by commas, spaces, tabs, or semicolons.
Returns:The parsed table borders. A single record supplies all six table borders; six records are ordered left, top, right, bottom, inside horizontal, and inside vertical.
Exceptions: FormatExceptionThe string does not contain a supported number of components.
Overrides:
Serializes the table borders as one record when all six borders are equal, or as six edge records otherwise.
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
The type descriptor context, if supplied.
cultureCultureInfoIgnored; border thickness is formatted using invariant culture.
valueobjectThe table borders to serialize.
destinationTypeTypeThe requested output type; this converter supports string.
Returns:The serialized border records, including theme color metadata.
Overrides: