Table of Contents

Method AnchorEnd

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

AnchorEnd()

Creates a Pos object that is anchored to the end (right side or bottom) of the SuperView's Content Area, minus the respective size of the View. This is equivalent to using AnchorEnd(int), with an offset equivalent to the View's respective dimension.

public static Pos AnchorEnd()

Returns

Pos

The Pos object anchored to the end (the bottom or the right side) minus the View's dimension.

Examples

This sample shows how align a Button to the bottom-right the SuperView.

anchorButton.X = Pos.AnchorEnd ();
anchorButton.Y = Pos.AnchorEnd ();

AnchorEnd(int)

Creates a Pos object that is anchored to the end (right side or bottom) of the SuperView's Content Area, useful to flush the layout from the right or bottom. See also AnchorEnd(), which uses the view dimension to ensure the view is fully visible.

public static Pos AnchorEnd(int offset)

Parameters

offset int

The view will be shifted left or up by the amount specified.

Returns

Pos

The Pos object anchored to the end (the bottom or the right side).

Examples

This sample shows how align a 10 column wide Button to the bottom-right the SuperView.

anchorButton.X = Pos.AnchorEnd (10);
anchorButton.Y = 1