Table of Contents

Struct HVAlignment

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

Contains vertical alignment and horizontal alignment.

public readonly struct HVAlignment : IEquatable<HVAlignment>
Implements

Constructors

HVAlignment()

Initializes a new instance of the HVAlignment struct.

HVAlignment(HorizontalAlignment)

Initializes a new instance of the HVAlignment struct.

HVAlignment(HorizontalAlignment, VerticalAlignment)

Initializes a new instance of the HVAlignment struct.

HVAlignment(VerticalAlignment)

Initializes a new instance of the HVAlignment struct.

Fields

Center

Gets HVAlignment with centered horizontal and vertical alignments.

Horizontal

Gets horizontal alignment.

TopLeft

Gets HVAlignment with alignment set to top-left.

Vertical

Gets vertical alignment.

Properties

IsHorizontalStretchOrFill

Gets whether horizontal alignment is Stretch or Fill.

IsStretchOrFill

Gets whether IsHorizontalStretchOrFill or IsVerticalStretchOrFill returns True.

IsVerticalStretchOrFill

Gets whether vertical alignment is Stretch or Fill.

Methods

Equals(HVAlignment)

Indicates whether the current object is equal to another object of the same type.

Equals(object?)

Determines whether the specified object is equal to the current object.

GetHashCode()

Serves as the default hash function.

HorizontalOrNull(GenericOrientation)

Gets horizontal alignment or Null if direction parameter doesn't contain Horizontal.

NextValue()

Gets next alignment value by incrementing alignments.

NextValue(CoordAlignment)

Returns next alignment or Near if alignment is maximal.

NextValueNoStretchOrFill()

Gets next alignment value by incrementing alignments. 'Stretch' or 'Fill' alignments are not returned.

ToString()

Creates a human-readable string that represents this HVAlignment.

VerticalOrNull(GenericOrientation)

Gets vertical alignment or Null if direction parameter doesn't contain Vertical.

WithHorizontal(CoordAlignment)

Returns this object with changed horizontal alignment.

WithHorizontal(HorizontalAlignment)

Returns this object with changed horizontal alignment.

WithVertical(CoordAlignment)

Returns this object with changed vertical alignment.

WithVertical(VerticalAlignment)

Returns this object with changed vertical alignment.

WithoutStretchOrFill(HVAlignment?)

Returns this object if IsStretchOrFill is False; otherwise returns overrideValue (or Center if it is not specified or Null).

Operators

operator ==(HVAlignment, HVAlignment)

Tests whether two specified HVAlignment structures are equivalent.

implicit operator HorizontalAlignment(HVAlignment)

Implicit operator declaration for the conversion from HVAlignment to HorizontalAlignment.

implicit operator VerticalAlignment(HVAlignment)

Implicit operator declaration for the conversion from HVAlignment to VerticalAlignment.

implicit operator HVAlignment(HorizontalAlignment)

Implicit operator declaration for the conversion from HorizontalAlignment to HVAlignment.

implicit operator HVAlignment(VerticalAlignment)

Implicit operator declaration for the conversion from VerticalAlignment to HVAlignment.

implicit operator HVAlignment((HorizontalAlignment Horizontal, VerticalAlignment Vertical))

Implicit operator declaration for the conversion from tuple with two alignment values to HVAlignment.

operator !=(HVAlignment, HVAlignment)

Tests whether two specified HVAlignment structures are different.