Padding
ReferencesRepresents an amount of padding to apply to an object at the top, left, right, and bottom.
Constructors
Padding
#Initializes a new instance of the Padding class with the specified padding for all sides
Parameters:
| all (int) | Amount of padding to apply to each side |
Padding
#Initializes a new instance of the Padding class with the specified padding for horizontal and vertical sides
Fields
Properties
Horizontal
#Size
#Gets the padding as a size value with the Horizontal and Vertical values as the Size.Width and Size.Height, respectively.
Vertical
#Methods
Ceiling
#Converts a floating point
padding to an integral padding by taking the ceiling of its componentsParameters:
| padding (PaddingF) | Padding to convert |
Returns: A new instance of a Padding class with the ceiling of the specified
paddingEquals
#Determines the equality between this instance and the specified object
Parameters:
| obj (object) | Object to compare to |
Returns: True if obj is a Padding object and is equal to this instance, false if not
Overrides: ValueType.Equals
Equals
#Determines equality between this instance and the specified padding
Parameters:
| other (Padding) | Other padding instance to compare with |
Returns: True if the specified padding is equal to this instance, false if not
GetHashCode
#Gets the hash code for this Padding instance
Returns: Hash code for this instance
Overrides: ValueType.GetHashCode
Round
#Converts a floating point
padding to an integral padding by rounding each of its componentsParameters:
| padding (PaddingF) | Padding to convert |
Returns: A new instance of a Padding class with rounded components of the specified
paddingToString
#Converts this object to a string
Returns: String representation of this object
Overrides: ValueType.ToString
Operators
| Operation | Result | Description | ||
|---|---|---|---|---|
| Padding | + | Padding | Padding | Adds two padding values together |
| Padding | == | Padding | bool | Determines the equality of two padding objects |
| Padding | != | Padding | bool | Determines the inequality of two padding objects |
| Padding | - | Padding | Padding | Subtracts a padding value from another value |
| - | Padding | Padding | Returns a new Padding with negative left, top, right, and bottom values | |