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
Namespace: Sartorius.SAF.Presentation.Controls
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
[TypeConverter(typeof(PaddingConverter))]
public struct Padding : IEquatable<Padding>
  Constructors
View SourcePadding(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.  | 
      
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.  | 
      
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.  | 
      
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.  | 
      
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 SourceBottomProperty
Identifies the Bottom attached property.
Declaration
public static readonly DependencyProperty BottomProperty
  Field Value
| Type | Description | 
|---|---|
| System.Windows.DependencyProperty | 
Empty
Represents an empty Padding. This field is read-only.
Declaration
public static readonly Padding Empty
  Field Value
| Type | Description | 
|---|---|
| Padding | 
LeftProperty
Identifies the Left attached property.
Declaration
public static readonly DependencyProperty LeftProperty
  Field Value
| Type | Description | 
|---|---|
| System.Windows.DependencyProperty | 
RightProperty
Identifies the Right attached property.
Declaration
public static readonly DependencyProperty RightProperty
  Field Value
| Type | Description | 
|---|---|
| System.Windows.DependencyProperty | 
TopProperty
Identifies the Top attached property.
Declaration
public static readonly DependencyProperty TopProperty
  Field Value
| Type | Description | 
|---|---|
| System.Windows.DependencyProperty | 
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 SourceBottom
Gets or sets the length of the lower side of the padding.
Declaration
public PaddingLength Bottom { get; set; }
  Property Value
| Type | Description | 
|---|---|
| PaddingLength | 
Left
Gets or sets the length of the left side of the padding.
Declaration
public PaddingLength Left { get; set; }
  Property Value
| Type | Description | 
|---|---|
| PaddingLength | 
Right
Gets or sets the length of the right side of the padding.
Declaration
public PaddingLength Right { get; set; }
  Property Value
| Type | Description | 
|---|---|
| PaddingLength | 
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 SourceEquals(Padding)
Declaration
public bool Equals(Padding other)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Padding | other | The padding to compare.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
  | 
      
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 | 
  | 
      
Overrides
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.  | 
      
GetHashCode()
Declaration
public override int GetHashCode()
  Returns
| Type | Description | 
|---|---|
| System.Int32 | 
Overrides
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.  | 
      
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.  | 
      
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.  | 
      
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.  | 
      
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.  | 
      
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.  | 
      
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.  | 
      
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.  | 
      
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.  | 
      
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
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 SourceEquality(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 | 
  | 
      
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 | 
  |