PaddingConverter
Converts padding values from various formats to a standardized format.
Definition
Namespace:Telerik.Windows.Documents.Layout
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public class PaddingConverter : TypeConverter
Inheritance: objectTypeConverterPaddingConverter
Inherited Members
Constructors
public PaddingConverter()
Methods
Determines whether the specified type can be converted from the given context.
public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType)
The context that provides additional information about the environment from which this conversion is being called.
sourceTypeTypeThe type that is being evaluated for conversion.
Returns:True if the specified type can be converted from the provided context; otherwise, false.
Overrides:
Determines whether an instance of the PaddingConverter can convert the specified type to another type.
public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType)
An ITypeDescriptorContext that provides a format context.
destinationTypeTypeA Type that represents the type to convert to.
Returns:True if the conversion can be performed; otherwise, false.
Overrides:
Converts a specified object into a Padding value based on the provided context and culture information.
public override object ConvertFrom(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object source)
The context in which the conversion is performed, providing additional context or services.
cultureInfoCultureInfoThe culture information used to interpret the object being converted.
sourceobjectThe object to be converted into a Padding value.
Returns:A Padding value represented by the converted object.
Overrides:
Converts the specified object to a specified type using the provided context and culture information.
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
An ITypeDescriptorContext that provides a format context.
cultureCultureInfoA CultureInfo that represents the culture to use in the conversion.
valueobjectThe object to be converted.
destinationTypeTypeThe Type to which the object should be converted.
Returns:Returns the converted value of the specified type.
Overrides: