ClassPaddingConverter
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
PaddingConverter()
Declaration
public PaddingConverter()
Methods
CanConvertFrom(ITypeDescriptorContext, Type)
Determines whether the specified type can be converted from the given context.
Declaration
public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType)
Parameters
typeDescriptorContext
The context that provides additional information about the environment from which this conversion is being called.
sourceType
The type that is being evaluated for conversion.
Returns
True if the specified type can be converted from the provided context; otherwise, false.
Overrides
CanConvertTo(ITypeDescriptorContext, Type)
Determines whether an instance of the PaddingConverter can convert the specified type to another type.
Declaration
public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType)
Parameters
typeDescriptorContext
An ITypeDescriptorContext that provides a format context.
destinationType
A Type that represents the type to convert to.
Returns
True if the conversion can be performed; otherwise, false.
Overrides
ConvertFrom(ITypeDescriptorContext, CultureInfo, object)
Converts a specified object into a Padding value based on the provided context and culture information.
Declaration
public override object ConvertFrom(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object source)
Parameters
typeDescriptorContext
The context in which the conversion is performed, providing additional context or services.
cultureInfo
The culture information used to interpret the object being converted.
source
The object to be converted into a Padding value.
Returns
A Padding value represented by the converted object.
Overrides
ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)
Converts the specified object to a specified type using the provided context and culture information.
Declaration
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
Parameters
context
An ITypeDescriptorContext that provides a format context.
culture
A CultureInfo that represents the culture to use in the conversion.
value
The object to be converted.
destinationType
The Type to which the object should be converted.
Returns
Returns the converted value of the specified type.
Overrides