Table of Contents

Struct Thickness

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Thickness is a value type used to describe the thickness of frame around a rectangle. It contains four values each corresponding to a side: Left, Top, Right, Bottom.

public struct Thickness : IEquatable<Thickness>
Implements

Constructors

Thickness(double)

This constructur builds a Thickness with a specified value on every side.

Thickness(double, double)

Initializes a new instance of the Thickness structure.

Thickness(double, double, double, double)

This constructor builds a Thickness with the specified number of pixels on each side.

Fields

Empty

Gets an empty Thickness object with Left, Top, Right, Bottom properties equal to zero.

Properties

Bottom

This property is the Length on the thickness' bottom side.

Horizontal

Gets the combined padding for the right and left edges.

IsAnyPositive

Returns whether any value on the side is positive (greater than 0).

IsPositive

Returns whether all values on every side are positive (greater than 0).

IsUniform

Returns whether all values on every side are equal.

Left

This property is the Length on the thickness' left side.

LeftTop

Gets Left and Top as SizeD.

Right

This property is the Length on the thickness' right side.

RightBottom

Gets Right and Bottom as SizeD.

Size

Gets the combined padding information in the form of a SizeD.

Top

This property is the Length on the thickness' top side.

Vertical

Gets the combined padding for the top and bottom edges.

Methods

ApplyMin(Thickness)

Apply minimal limits to all the fields of the Thickness instance.

ApplyMinMax(double, double)

Apply minimal and maximal limits to all the fields of the Thickness instance.

Equals(Thickness)

Compares this instance of Thickness with another instance.

Equals(object?)

This function compares to the provided object for type and value equality.

GetHashCode()

Serves as the default hash function.

Inflate(double)

Inflate all fields of the Thickness instance on the same value.

Parse(string)

Parses a Thickness string.

ToString()

Converts this Thickness object to a string.

TryParse(string, out Thickness)

Parses a Thickness string.

Operators

operator ==(Thickness, Thickness)

Overloaded operator to compare two Thicknesses for equality.

implicit operator Thickness(double)

Implicit operator convertion from a single value to Thickness. All fields of thickness instance are assigned with the same value.

implicit operator Thickness(int)

Implicit operator convertion from int to Thickness. All fields of thickness instance are assigned with the same int value.

implicit operator Thickness((double, double, double, double))

Implicit operator convertion from tuple with four values to Thickness.

operator !=(Thickness, Thickness)

Overloaded operator to compare two Thicknesses for inequality.