Converts table-column width lists to and from semicolon-separated strings for serialization.
Definition
Namespace:Telerik.WinForms.Documents.Model
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class TableGridColumnWidthsSerializationInfoConverter : TypeConverter
Inheritance: objectTypeConverterTableGridColumnWidthsSerializationInfoConverter
Inherited Members
Constructors
public TableGridColumnWidthsSerializationInfoConverter()
Methods
Determines whether the converter can parse a string or a type supported by the base converter.
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
The type descriptor context, if supplied.
sourceTypeTypeThe source type to check.
Returns:true for strings or source types accepted by the base converter.
Overrides:
Determines whether the converter can produce a string or a type supported by the base converter.
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
The type descriptor context, if supplied.
destinationTypeTypeThe destination type to check.
Returns:true for strings or destination types accepted by the base converter.
Overrides:
Parses a semicolon-separated list of width units; each entry uses the format handled by TableWidthUnitConverter. Empty entries represent null widths, and non-string values are passed to the base converter.
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
The type descriptor context, if supplied.
cultureCultureInfoThe culture used by the base converter for non-string values; width entries use invariant formatting.
valueobjectThe serialized width list or a value accepted by the base converter.
Returns:A TableGridColumnWidthsSerializationInfo for a string, or the base converter's result.
Overrides:
Serializes width entries as a semicolon-separated list, omitting trailing null widths; other destination types use the base converter.
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
The type descriptor context, if supplied.
cultureCultureInfoThe culture used by the base converter for non-string destinations; width entries use invariant formatting.
valueobjectThe table-column width list to serialize.
destinationTypeTypeThe requested output type.
Returns:The serialized width list when destinationType is string; otherwise, the base converter's result.
Overrides: