ThicknessConverter
Converts numeric values and component strings to Thickness values.
Definition
Namespace:Telerik.WinControls.Spreadsheet.UI
Assembly:Telerik.WinControls.RadSpreadsheet.dll
Syntax:
public class ThicknessConverter : TypeConverter
Inheritance: objectTypeConverterThicknessConverter
Inherited Members
Constructors
public ThicknessConverter()
Methods
Determines whether a value of the specified type can be converted to a Thickness.
public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType)
The conversion context.
sourceTypeTypeThe source type to check.
Returns:true for signed or unsigned 16-, 32-, and 64-bit integers, float, double, decimal, strings, and enums with one of those integer underlying types; otherwise, false.
Overrides:
Converts a numeric value or component string to a Thickness.
public override object ConvertFrom(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object source)
The conversion context.
cultureInfoCultureInfoThe culture used to parse numbers and component separators.
sourceobjectA number or a string with one, two, or four length components.
Returns:A uniform thickness for one component, paired horizontal/vertical values for two, or individual sides for four.
Exceptions: FormatExceptionThe string contains three components or an unsupported number of components.
Overrides: