ThicknessConverter
Converts numeric values or one-, two-, and four-part strings to Thickness values. Numeric input and one-part strings apply the same thickness to all sides.
Definition
Namespace:Telerik.WinControls.UI.Diagrams
Assembly:Telerik.WinControls.RadDiagram.dll
Syntax:
public class ThicknessConverter : TypeConverter
Inheritance: objectTypeConverterThicknessConverter
Inherited Members
Constructors
public ThicknessConverter()
Methods
Checks whether the converter accepts one of its supported numeric types or a thickness string.
public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType)
The conversion context, when available.
sourceTypeTypeThe type of the value to convert.
Returns:true for signed or unsigned 16-, 32-, and 64-bit integers, enums with those underlying types, single- or double-precision values, decimal values, and strings; otherwise, false.
Overrides:
Converts a number to uniform side thickness or parses a string containing one, two, or four length values.
public override object ConvertFrom(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object source)
The conversion context, when available.
cultureInfoCultureInfoThe culture used to parse numeric text.
sourceobjectA supported numeric value or a string with one, two, or four thickness values.
Returns:The thickness represented by the input; two values apply horizontally and vertically, while four values specify left, top, right, and bottom.
Exceptions: FormatExceptionA string contains a number of thickness values other than one, two, or four, or contains a value that cannot be parsed as a length.
Overrides: