Table of Contents

Method SetRelativeLayout

Namespace
Terminal.Gui.ViewBase
Assembly
Terminal.Gui.dll

SetRelativeLayout(Size)

Resolves this view's declarative layout into a concrete position and size, relative to the SuperView's content size, based on X, Y, Width, and Height.

public bool SetRelativeLayout(Size superviewContentSize)

Parameters

superviewContentSize Size

The size of the SuperView's content (nominally the same as this.SuperView.GetContentSize ()).

Returns

bool

true if successful. false means a dependent View still needs layout.

Remarks

This method is the core step that turns responsive Pos and Dim expressions into the view's absolute Frame.

If X, Y, Width, or Height are absolute, they will be updated to reflect the new size and position of the view. Otherwise, they are left unchanged.

This method does not arrange subviews or adornments. It is intended to be called by the layout engine to prepare the view for layout and is exposed as a public API primarily for testing purposes.

Some subviews may have SetRelativeLayout called on them as a side effect, particularly in DimAuto scenarios.