Skip to main content

HorizontalAlignment Enum

Definition

Namespace:Avalonia.Layout
Assembly:Avalonia.Base
Package:Avalonia

Defines how a control aligns itself horizontally in its parent control.

public enum HorizontalAlignment

Inheritance: Enum -> HorizontalAlignment

Fields

NameDescription
CenterThe control centers itself in the parent control.
LeftThe control aligns itself to the left of the parent control.
RightThe control aligns itself to the right of the parent control.
StretchThe control stretches to fill the width of the parent control.

Center Field

The control centers itself in the parent control.

public Avalonia.Layout.HorizontalAlignment Center

Left Field

The control aligns itself to the left of the parent control.

public Avalonia.Layout.HorizontalAlignment Left

Right Field

The control aligns itself to the right of the parent control.

public Avalonia.Layout.HorizontalAlignment Right

Stretch Field

The control stretches to fill the width of the parent control.

public Avalonia.Layout.HorizontalAlignment Stretch