Table of Contents

Method Percent

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Percent(int)

Creates a percentage Pos object

public static Pos Percent(int percent)

Parameters

percent int

A value between 0 and 100 representing the percentage.

Returns

Pos

The percent Pos object.

Examples

This creates a TextField centered horizontally, is 50% of the way down, is 30% the height, and is 80% the width of the View it added to.

var textView = new TextField {
    X = Pos.Center (),
    Y = Pos.Percent (50),
    Width = Dim.Percent (80),
    Height = Dim.Percent (30),
};