Show / Hide Table of Contents

Class PaddingConverter

Converts instances of other types to and from instances of Padding.

Inheritance
object
TypeConverter
ThicknessConverter
PaddingConverter
Implements
IValueConverter
TypeConverter.CanConvertFrom(Type)
TypeConverter.CanConvertTo(Type)
TypeConverter.ConvertFrom(object)
TypeConverter.ConvertFromInvariantString(ITypeDescriptorContext, string)
TypeConverter.ConvertFromInvariantString(string)
TypeConverter.ConvertFromString(ITypeDescriptorContext, CultureInfo, string)
TypeConverter.ConvertFromString(ITypeDescriptorContext, string)
TypeConverter.ConvertFromString(string)
TypeConverter.ConvertTo(object, Type)
TypeConverter.ConvertToInvariantString(ITypeDescriptorContext, object)
TypeConverter.ConvertToInvariantString(object)
TypeConverter.ConvertToString(ITypeDescriptorContext, CultureInfo, object)
TypeConverter.ConvertToString(ITypeDescriptorContext, object)
TypeConverter.ConvertToString(object)
TypeConverter.CreateInstance(IDictionary)
TypeConverter.CreateInstance(ITypeDescriptorContext, IDictionary)
TypeConverter.GetConvertFromException(object)
TypeConverter.GetConvertToException(object, Type)
TypeConverter.GetCreateInstanceSupported()
TypeConverter.GetCreateInstanceSupported(ITypeDescriptorContext)
TypeConverter.GetProperties(ITypeDescriptorContext, object)
TypeConverter.GetProperties(ITypeDescriptorContext, object, Attribute[])
TypeConverter.GetProperties(object)
TypeConverter.GetPropertiesSupported()
TypeConverter.GetPropertiesSupported(ITypeDescriptorContext)
TypeConverter.GetStandardValues()
TypeConverter.GetStandardValues(ITypeDescriptorContext)
TypeConverter.GetStandardValuesExclusive()
TypeConverter.GetStandardValuesExclusive(ITypeDescriptorContext)
TypeConverter.GetStandardValuesSupported()
TypeConverter.GetStandardValuesSupported(ITypeDescriptorContext)
TypeConverter.IsValid(ITypeDescriptorContext, object)
TypeConverter.IsValid(object)
TypeConverter.SortProperties(PropertyDescriptorCollection, string[])
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Sartorius.SAF.Presentation.Controls
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
public class PaddingConverter : ThicknessConverter, IValueConverter

Methods

View Source

CanConvertFrom(ITypeDescriptorContext, Type)

Determines whether the type converter can create an instance of Thickness from a specified type.

Declaration
public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType)
Parameters
Type Name Description
ITypeDescriptorContext typeDescriptorContext

The context information of a type.

Type sourceType

The source type that the type converter is evaluating for conversion.

Returns
Type Description
bool

true if the type converter can create an instance of Thickness from the specified type; otherwise, false.

Overrides
ThicknessConverter.CanConvertFrom(ITypeDescriptorContext, Type)
View Source

CanConvertTo(ITypeDescriptorContext, Type)

Determines whether the type converter can convert an instance of Thickness to a different type.

Declaration
public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType)
Parameters
Type Name Description
ITypeDescriptorContext typeDescriptorContext

The context information of a type.

Type destinationType

The type for which the type converter is evaluating this instance of Thickness for conversion.

Returns
Type Description
bool

true if the type converter can convert this instance of Thickness to the destinationType; otherwise, false.

Overrides
ThicknessConverter.CanConvertTo(ITypeDescriptorContext, Type)
View Source

Convert(object, Type, object, CultureInfo)

Converts a value.

Declaration
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
Type Name Description
object value

The value produced by the binding source.

Type targetType

The type of the binding target property.

object parameter

The converter parameter to use.

CultureInfo culture

The culture to use in the converter.

Returns
Type Description
object

A converted value. If the method returns null, the valid null value is used.

View Source

ConvertBack(object, Type, object, CultureInfo)

Converts a value.

Declaration
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
Type Name Description
object value

The value that is produced by the binding target.

Type targetType

The type to convert to.

object parameter

The converter parameter to use.

CultureInfo culture

The culture to use in the converter.

Returns
Type Description
object

A converted value. If the method returns null, the valid null value is used.

View Source

ConvertFrom(ITypeDescriptorContext, CultureInfo, object)

Attempts to create an instance of Thickness from a specified object.

Declaration
public override object ConvertFrom(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object source)
Parameters
Type Name Description
ITypeDescriptorContext typeDescriptorContext

The context information for a type.

CultureInfo cultureInfo

The CultureInfo of the type being converted.

object source

The sourceobject being converted.

Returns
Type Description
object

An instance of Thickness created from the converted source.

Overrides
ThicknessConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, object)
Exceptions
Type Condition
ArgumentNullException

The source object is a null reference (Nothing in Visual Basic).

ArgumentException

The example object is not a null reference and is not a valid type that can be converted to a Thickness.

View Source

ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)

Attempts to convert an instance of Thickness to a specified type.

Declaration
public override object ConvertTo(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object value, Type destinationType)
Parameters
Type Name Description
ITypeDescriptorContext typeDescriptorContext

The context information of a type.

CultureInfo cultureInfo

The CultureInfo of the type being converted.

object value

The instance of Thickness to convert.

Type destinationType

The type that this instance of Thickness is converted to.

Returns
Type Description
object

The type that is created when the type converter converts an instance of Thickness.

Overrides
ThicknessConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)
Exceptions
Type Condition
ArgumentNullException

The value object is not a null reference (Nothing) and is not a Brush, or the destinationType is not one of the valid types for conversion.

ArgumentException

The value object is a null reference.

Implements

IValueConverter

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX