ThicknessConverter
Converts numeric values or one-, two-, and four-value strings to Thickness values.
Definition
Namespace:Telerik.WinControls.RichTextEditor.UI
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class ThicknessConverter : TypeConverter
Inheritance: objectTypeConverterThicknessConverter
Inherited Members
Constructors
public ThicknessConverter()
Methods
Determines whether the specified source type is supported.
public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType)
The conversion context, which this converter does not use.
sourceTypeTypeThe source type to test.
Returns:true for supported numeric types and strings; otherwise, false.
Overrides:
Converts a numeric value to uniform thickness or parses a string into side values. Two string values specify horizontal and vertical thickness; four specify left, top, right, and bottom. Each string value uses the length syntax supported by LengthConverter.
public override object ConvertFrom(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object source)
The conversion context, which this converter does not use.
cultureInfoCultureInfoThe culture used to parse numeric values and strings.
sourceobjectA numeric value or a string containing one, two, or four length values.
Returns:The converted Thickness.
Exceptions: FormatExceptionsource is a string with an unsupported number of values or an invalid length.
Overrides: