Align Class

Represents a renderable used to align content.
public sealed class Align : Renderable, IRenderable
Namespace
Spectre.Console
Interfaces
Base Types

Constructors

Align(IRenderable, HorizontalAlignment, VerticalAlignment?)
Initializes a new instance of the Align class.

Properties

int? Height
Gets or sets the height.
HorizontalAlignment Horizontal
Gets or sets the horizontal alignment.
VerticalAlignment? Vertical
Gets or sets the vertical alignment.
int? Width
Gets or sets the width.

Methods

static Align Center(IRenderable, VerticalAlignment?)
Initializes a new instance of the Align class that is center aligned.
static Align Left(IRenderable, VerticalAlignment?)
Initializes a new instance of the Align class that is left aligned.
protected virtual Measurement Measure(RenderOptions, int)
Measures the renderable object.
protected override IEnumerable<Segment> Render(RenderOptions, int)
Renders the object.
static Align Right(IRenderable, VerticalAlignment?)
Initializes a new instance of the Align class that is right aligned.

Extension Methods

Align BottomAligned()
Sets the Align object to be bottom aligned.
IEnumerable<Segment> GetSegments(IAnsiConsole)
Gets the segments for a renderable using the specified console.
Align Height(int?)
Sets the height.
Align MiddleAligned()
Sets the Align object to be middle aligned.
Align TopAligned()
Sets the Align object to be top aligned.
Align VerticalAlignment(VerticalAlignment?)
Sets the vertical alignment.
Align Width(int?)
Sets the width.