New to Telerik UI for WinForms? Start a free 30-day trial

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:

C#
public class TableGridColumnWidthsSerializationInfoConverter : TypeConverter

Inheritance: objectTypeConverterTableGridColumnWidthsSerializationInfoConverter

Inherited Members TypeConverter.CanConvertFrom(Type)TypeConverter.CanConvertTo(Type)TypeConverter.ConvertFrom(object)TypeConverter.ConvertFromInvariantString(string)TypeConverter.ConvertFromInvariantString(ITypeDescriptorContext, string)TypeConverter.ConvertFromString(string)TypeConverter.ConvertFromString(ITypeDescriptorContext, string)TypeConverter.ConvertFromString(ITypeDescriptorContext, CultureInfo, string)TypeConverter.ConvertTo(object, Type)TypeConverter.ConvertToInvariantString(object)TypeConverter.ConvertToInvariantString(ITypeDescriptorContext, object)TypeConverter.ConvertToString(object)TypeConverter.ConvertToString(ITypeDescriptorContext, object)TypeConverter.ConvertToString(ITypeDescriptorContext, CultureInfo, object)TypeConverter.CreateInstance(IDictionary)TypeConverter.CreateInstance(ITypeDescriptorContext, IDictionary)TypeConverter.GetConvertFromException(object)TypeConverter.GetConvertToException(object, Type)TypeConverter.GetCreateInstanceSupported()TypeConverter.GetCreateInstanceSupported(ITypeDescriptorContext)TypeConverter.GetProperties(object)TypeConverter.GetProperties(ITypeDescriptorContext, object)TypeConverter.GetProperties(ITypeDescriptorContext, object, Attribute[])TypeConverter.GetPropertiesSupported()TypeConverter.GetPropertiesSupported(ITypeDescriptorContext)TypeConverter.GetStandardValues()TypeConverter.GetStandardValues(ITypeDescriptorContext)TypeConverter.GetStandardValuesExclusive()TypeConverter.GetStandardValuesExclusive(ITypeDescriptorContext)TypeConverter.GetStandardValuesSupported()TypeConverter.GetStandardValuesSupported(ITypeDescriptorContext)TypeConverter.IsValid(object)TypeConverter.IsValid(ITypeDescriptorContext, object)TypeConverter.SortProperties(PropertyDescriptorCollection, string[])...

Constructors

C#
public TableGridColumnWidthsSerializationInfoConverter()

Methods

Determines whether the converter can parse a string or a type supported by the base converter.

C#
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
Parameters:contextITypeDescriptorContext

The type descriptor context, if supplied.

sourceTypeType

The source type to check.

Returns:

bool

true for strings or source types accepted by the base converter.

Overrides: TypeConverter.CanConvertFrom(ITypeDescriptorContext, Type)

Determines whether the converter can produce a string or a type supported by the base converter.

C#
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
Parameters:contextITypeDescriptorContext

The type descriptor context, if supplied.

destinationTypeType

The destination type to check.

Returns:

bool

true for strings or destination types accepted by the base converter.

Overrides: TypeConverter.CanConvertTo(ITypeDescriptorContext, Type)

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.

C#
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
Parameters:contextITypeDescriptorContext

The type descriptor context, if supplied.

cultureCultureInfo

The culture used by the base converter for non-string values; width entries use invariant formatting.

valueobject

The serialized width list or a value accepted by the base converter.

Returns:

object

A TableGridColumnWidthsSerializationInfo for a string, or the base converter's result.

Overrides: TypeConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, object)

Serializes width entries as a semicolon-separated list, omitting trailing null widths; other destination types use the base converter.

C#
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
Parameters:contextITypeDescriptorContext

The type descriptor context, if supplied.

cultureCultureInfo

The culture used by the base converter for non-string destinations; width entries use invariant formatting.

valueobject

The table-column width list to serialize.

destinationTypeType

The requested output type.

Returns:

object

The serialized width list when destinationType is string; otherwise, the base converter's result.

Overrides: TypeConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)