New to Telerik UI for WPFStart a free 30-day trial

Converts padding values from various formats to a standardized format.

Definition

Namespace:Telerik.Windows.Documents.Layout

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

C#
public class PaddingConverter : TypeConverter

Inheritance: objectTypeConverterPaddingConverter

Inherited Members TypeConverter.CanConvertFrom(Type)TypeConverter.CanConvertTo(Type)TypeConverter.ConvertFrom(object)TypeConverter.ConvertFromInvariantString(string)TypeConverter.ConvertFromInvariantString(ITypeDescriptorContext, string)TypeConverter.ConvertFromString(string)TypeConverter.ConvertFromString(ITypeDescriptorContext, string)TypeConverter.ConvertFromString(ITypeDescriptorContext, CultureInfo, string)TypeConverter.ConvertTo(object, Type)TypeConverter.ConvertToInvariantString(object)TypeConverter.ConvertToInvariantString(ITypeDescriptorContext, object)TypeConverter.ConvertToString(object)TypeConverter.ConvertToString(ITypeDescriptorContext, object)TypeConverter.ConvertToString(ITypeDescriptorContext, CultureInfo, object)TypeConverter.CreateInstance(IDictionary)TypeConverter.CreateInstance(ITypeDescriptorContext, IDictionary)TypeConverter.GetConvertFromException(object)TypeConverter.GetConvertToException(object, Type)TypeConverter.GetCreateInstanceSupported()TypeConverter.GetCreateInstanceSupported(ITypeDescriptorContext)TypeConverter.GetProperties(object)TypeConverter.GetProperties(ITypeDescriptorContext, object)TypeConverter.GetProperties(ITypeDescriptorContext, object, Attribute[])TypeConverter.GetPropertiesSupported()TypeConverter.GetPropertiesSupported(ITypeDescriptorContext)TypeConverter.GetStandardValues()TypeConverter.GetStandardValues(ITypeDescriptorContext)TypeConverter.GetStandardValuesExclusive()TypeConverter.GetStandardValuesExclusive(ITypeDescriptorContext)TypeConverter.GetStandardValuesSupported()TypeConverter.GetStandardValuesSupported(ITypeDescriptorContext)TypeConverter.IsValid(object)TypeConverter.IsValid(ITypeDescriptorContext, object)TypeConverter.SortProperties(PropertyDescriptorCollection, string[])...

Constructors

C#
public PaddingConverter()

Methods

Determines whether the specified type can be converted from the given context.

C#
public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType)
Parameters:typeDescriptorContextITypeDescriptorContext

The context that provides additional information about the environment from which this conversion is being called.

sourceTypeType

The type that is being evaluated for conversion.

Returns:

bool

True if the specified type can be converted from the provided context; otherwise, false.

Overrides: TypeConverter.CanConvertFrom(ITypeDescriptorContext, Type)

Determines whether an instance of the PaddingConverter can convert the specified type to another type.

C#
public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType)
Parameters:typeDescriptorContextITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

destinationTypeType

A Type that represents the type to convert to.

Returns:

bool

True if the conversion can be performed; otherwise, false.

Overrides: TypeConverter.CanConvertTo(ITypeDescriptorContext, Type)

Converts a specified object into a Padding value based on the provided context and culture information.

C#
public override object ConvertFrom(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object source)
Parameters:typeDescriptorContextITypeDescriptorContext

The context in which the conversion is performed, providing additional context or services.

cultureInfoCultureInfo

The culture information used to interpret the object being converted.

sourceobject

The object to be converted into a Padding value.

Returns:

object

A Padding value represented by the converted object.

Overrides: TypeConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, object)

Converts the specified object to a specified type using the provided context and culture information.

C#
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
Parameters:contextITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

cultureCultureInfo

A CultureInfo that represents the culture to use in the conversion.

valueobject

The object to be converted.

destinationTypeType

The Type to which the object should be converted.

Returns:

object

Returns the converted value of the specified type.

Overrides: TypeConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)