Show / Hide Table of Contents

Struct Padding

Describes the padding around the content of a PaddedViewbox. Four PaddingLength values describe the Left, Top, Right and Bottom sides of the padding, respectively.

Implements
System.IEquatable<Padding>
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Sartorius.SAF.Presentation.Controls
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
[TypeConverter(typeof(PaddingConverter))]
public struct Padding : IEquatable<Padding>

Constructors

View Source

Padding(PaddingLength)

Initializes a new instance of the Padding structure that has the specified uniform length on each side.

Declaration
public Padding(PaddingLength uniformLength)
Parameters
Type Name Description
PaddingLength uniformLength

The uniform length applied to all four sides of the padding.

View Source

Padding(PaddingLength, PaddingLength, PaddingLength, PaddingLength)

Initializes a new instance of the Padding structure that has specific lengths (supplied as PaddingLength) applied to each side of the padding.

Declaration
public Padding(PaddingLength left, PaddingLength top, PaddingLength right, PaddingLength bottom)
Parameters
Type Name Description
PaddingLength left

The length for the left side of the padding.

PaddingLength top

The length for the upper side of the padding.

PaddingLength right

The length for the right side of the padding.

PaddingLength bottom

The length for the lower side of the padding.

View Source

Padding(Double)

Initializes a new instance of the Padding structure that has the specified uniform thickness on each side.

Declaration
public Padding(double uniformPixels)
Parameters
Type Name Description
System.Double uniformPixels

The uniform thickness applied to all four sides of the padding.

View Source

Padding(Double, PaddingUnitType)

Initializes a new instance of the Padding structure that has the specified uniform length with the specified unit type on each side.

Declaration
public Padding(double uniformLength, PaddingUnitType type)
Parameters
Type Name Description
System.Double uniformLength

The uniform length applied to all four sides of the padding.

PaddingUnitType type

The uniform unit type applied to all four sides of the padding.

View Source

Padding(Double, Double, Double, Double)

Initializes a new instance of the Padding structure that has specific lengths (supplied as System.Double) applied to each side of the padding.

Declaration
public Padding(double left, double top, double right, double bottom)
Parameters
Type Name Description
System.Double left

The thickness for the left side of the padding.

System.Double top

The thickness for the upper side of the padding.

System.Double right

The thickness for the right side of the padding.

System.Double bottom

The thickness for the lower side of the padding.

Fields

View Source

BottomProperty

Identifies the Bottom attached property.

Declaration
public static readonly DependencyProperty BottomProperty
Field Value
Type Description
System.Windows.DependencyProperty
View Source

Empty

Represents an empty Padding. This field is read-only.

Declaration
public static readonly Padding Empty
Field Value
Type Description
Padding
View Source

LeftProperty

Identifies the Left attached property.

Declaration
public static readonly DependencyProperty LeftProperty
Field Value
Type Description
System.Windows.DependencyProperty
View Source

RightProperty

Identifies the Right attached property.

Declaration
public static readonly DependencyProperty RightProperty
Field Value
Type Description
System.Windows.DependencyProperty
View Source

TopProperty

Identifies the Top attached property.

Declaration
public static readonly DependencyProperty TopProperty
Field Value
Type Description
System.Windows.DependencyProperty
View Source

ValueProperty

Identifies the Sartorius.SAF.Presentation.Controls.Padding.Value attached property.

Declaration
public static readonly DependencyProperty ValueProperty
Field Value
Type Description
System.Windows.DependencyProperty

Properties

View Source

Bottom

Gets or sets the length of the lower side of the padding.

Declaration
public PaddingLength Bottom { get; set; }
Property Value
Type Description
PaddingLength
View Source

Left

Gets or sets the length of the left side of the padding.

Declaration
public PaddingLength Left { get; set; }
Property Value
Type Description
PaddingLength
View Source

Right

Gets or sets the length of the right side of the padding.

Declaration
public PaddingLength Right { get; set; }
Property Value
Type Description
PaddingLength
View Source

Top

Gets or sets the length of the upper side of the padding.

Declaration
public PaddingLength Top { get; set; }
Property Value
Type Description
PaddingLength

Methods

View Source

Equals(Padding)

Compares this Padding structure to another Padding for equality.

Declaration
public bool Equals(Padding other)
Parameters
Type Name Description
Padding other

The padding to compare.

Returns
Type Description
System.Boolean

true if the two paddings are equal; otherwise false.

View Source

Equals(Object)

Compares this Padding structure to another System.Object for equality.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The object to compare.

Returns
Type Description
System.Boolean

true if the two objects are equal; otherwise false.

Overrides
System.ValueType.Equals(System.Object)
View Source

GetBottom(DependencyObject)

Gets the value of the Bottom attached property from a given System.Windows.DependencyObject.

Declaration
public static PaddingLength GetBottom(DependencyObject element)
Parameters
Type Name Description
System.Windows.DependencyObject element

The element from which to read the property value.

Returns
Type Description
PaddingLength

The value of the Bottom attached property.

View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.ValueType.GetHashCode()
View Source

GetLeft(DependencyObject)

Gets the value of the Left attached property from a given System.Windows.DependencyObject.

Declaration
public static PaddingLength GetLeft(DependencyObject element)
Parameters
Type Name Description
System.Windows.DependencyObject element

The element from which to read the property value.

Returns
Type Description
PaddingLength

The value of the Left attached property.

View Source

GetRight(DependencyObject)

Gets the value of the Right attached property from a given System.Windows.DependencyObject.

Declaration
public static PaddingLength GetRight(DependencyObject element)
Parameters
Type Name Description
System.Windows.DependencyObject element

The element from which to read the property value.

Returns
Type Description
PaddingLength

The value of the Right attached property.

View Source

GetTop(DependencyObject)

Gets the value of the Top attached property from a given System.Windows.DependencyObject.

Declaration
public static PaddingLength GetTop(DependencyObject element)
Parameters
Type Name Description
System.Windows.DependencyObject element

The element from which to read the property value.

Returns
Type Description
PaddingLength

The value of the Top attached property.

View Source

GetValue(DependencyObject)

Gets the value of the Sartorius.SAF.Presentation.Controls.Padding.Value attached property from a given System.Windows.DependencyObject.

Declaration
public static Padding GetValue(DependencyObject element)
Parameters
Type Name Description
System.Windows.DependencyObject element

The element from which to read the property value.

Returns
Type Description
Padding

The value of the Sartorius.SAF.Presentation.Controls.Padding.Value attached property.

View Source

SetBottom(DependencyObject, PaddingLength)

Sets the value of the Bottom attached property to a given System.Windows.DependencyObject.

Declaration
public static void SetBottom(DependencyObject element, PaddingLength value)
Parameters
Type Name Description
System.Windows.DependencyObject element

The element on which to set the attached property.

PaddingLength value

The property value to set.

View Source

SetLeft(DependencyObject, PaddingLength)

Sets the value of the Left attached property to a given System.Windows.DependencyObject.

Declaration
public static void SetLeft(DependencyObject element, PaddingLength value)
Parameters
Type Name Description
System.Windows.DependencyObject element

The element on which to set the attached property.

PaddingLength value

The property value to set.

View Source

SetRight(DependencyObject, PaddingLength)

Sets the value of the Right attached property to a given System.Windows.DependencyObject.

Declaration
public static void SetRight(DependencyObject element, PaddingLength value)
Parameters
Type Name Description
System.Windows.DependencyObject element

The element on which to set the attached property.

PaddingLength value

The property value to set.

View Source

SetTop(DependencyObject, PaddingLength)

Sets the value of the Top attached property to a given System.Windows.DependencyObject.

Declaration
public static void SetTop(DependencyObject element, PaddingLength value)
Parameters
Type Name Description
System.Windows.DependencyObject element

The element on which to set the attached property.

PaddingLength value

The property value to set.

View Source

SetValue(DependencyObject, Padding)

Sets the value of the Sartorius.SAF.Presentation.Controls.Padding.Value attached property to a given System.Windows.DependencyObject.

Declaration
public static void SetValue(DependencyObject element, Padding value)
Parameters
Type Name Description
System.Windows.DependencyObject element

The element on which to set the attached property.

Padding value

The property value to set.

View Source

ToString()

Returns the string representation if the Padding.

Declaration
public override string ToString()
Returns
Type Description
System.String

A System.String that represents the Padding structure.

Overrides
System.ValueType.ToString()
View Source

ToString(CultureInfo)

Returns the string representation if the Padding structure according to the specified System.Globalization.CultureInfo.

Declaration
public string ToString(CultureInfo cultureInfo)
Parameters
Type Name Description
System.Globalization.CultureInfo cultureInfo

The culture used to format the string representation.

Returns
Type Description
System.String

A System.String that represents the Padding structure.

Operators

View Source

Equality(Padding, Padding)

Compares the value of two Padding structures for equality.

Declaration
public static bool operator ==(Padding left, Padding right)
Parameters
Type Name Description
Padding left

The first structure to compare.

Padding right

The second structure to compare.

Returns
Type Description
System.Boolean

true if the two instances of Padding are equal; otherwise false.

View Source

Inequality(Padding, Padding)

Compares the value of two Padding structures for inequality.

Declaration
public static bool operator !=(Padding left, Padding right)
Parameters
Type Name Description
Padding left

The first structure to compare.

Padding right

The second structure to compare.

Returns
Type Description
System.Boolean

true if the two instances of Padding are not equal; otherwise false.

Implements

System.IEquatable<T>

Extension Methods

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