Converts TableCellBorders values to and from their compact string representation.
Definition
Namespace:Telerik.WinForms.Documents.Model
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class TableCellBordersConverter : TypeConverter
Inheritance: objectTypeConverterTableCellBordersConverter
Inherited Members
Constructors
public TableCellBordersConverter()
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 style/color pair for all six edges, one thickness/style/color record for the four outer edges, or four outer-edge records. A record may append 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 cell borders. Four-record forms are ordered left, top, right, and bottom; forms other than the style/color pair leave inside borders at their default values.
Exceptions: FormatExceptionThe string does not contain a supported number of components.
Overrides:
Serializes a common outer border as one record, or differing outer borders as four edge records. Inside borders are not serialized.
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 cell borders to serialize.
destinationTypeTypeThe requested output type; this converter supports string.
Returns:The serialized outer-border records, including theme color metadata.
Overrides: