Share via


Thickness Struct

Definition

Struct defining thickness for each edge of a rectangle.

public value class Thickness
[System.ComponentModel.TypeConverter(typeof(Microsoft.Maui.Converters.ThicknessTypeConverter))]
public struct Thickness
[<System.ComponentModel.TypeConverter(typeof(Microsoft.Maui.Converters.ThicknessTypeConverter))>]
type Thickness = struct
Public Structure Thickness
Inheritance
Thickness
Attributes

Constructors

Name Description
Thickness(Double, Double, Double, Double)

Creates a new Thickness with individual edge thicknesses.

Thickness(Double, Double)

Creates a new Thickness with specified horizontal and vertical sizes.

Thickness(Double)

Creates a new Thickness with the same uniform size on all edges.

Fields

Name Description
Zero

A thickness with all edges set to zero.

Properties

Name Description
Bottom

Gets or sets the thickness of the bottom edge.

HorizontalThickness

Gets the total horizontal thickness (Left + Right).

IsEmpty

Gets a value indicating whether all edges have zero thickness.

IsNaN

Gets a value indicating whether any edge thickness is not a number (NaN).

Left

Gets or sets the thickness of the left edge.

Right

Gets or sets the thickness of the right edge.

Top

Gets or sets the thickness of the top edge.

VerticalThickness

Gets the total vertical thickness (Top + Bottom).

Methods

Name Description
Deconstruct(Double, Double, Double, Double)

Deconstructs the thickness into individual edge values.

Equals(Object)

Determines whether this instance and a specified object have the same values.

GetHashCode()

Returns the hash code for this Thickness.

Operators

Name Description
Addition(Thickness, Double)

Adds a uniform value to all edges of the thickness.

Addition(Thickness, Thickness)

Adds two thickness instances by summing their corresponding edges.

Equality(Thickness, Thickness)

Determines whether two Thickness instances have the same values.

Implicit(Double to Thickness)

Implicitly converts a Double to a uniform Thickness.

Implicit(Size to Thickness)

Implicitly converts a Size to a uniform Thickness.

Inequality(Thickness, Thickness)

Determines whether two Thickness instances have different values.

Subtraction(Thickness, Double)

Subtracts a uniform value from all edges of the thickness.

Extension Methods

Name Description
Lerp(Thickness, Thickness, Double)

Applies to