Table of Contents

Class Dim

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Dim properties of a View to control the position.

public class Dim
Inheritance
Dim
Inherited Members

Remarks

Use the Dim objects on the Width or Height properties of a View to control the position.

These can be used to set the absolute position, when merely assigning an integer value (via the implicit integer to Pos conversion), and they can be combined to produce more useful layouts, like: Pos.Center - 3, which would shift the position of the View 3 characters to the left after centering for example.

Methods

Equals(object)

Determines whether the specified object is equal to the current object.

Fill(int)

Initializes a new instance of the Dim class that fills the dimension, but leaves the specified number of colums for a margin.

Function(Func<int>)

Creates a "DimFunc" from the specified function.

GetHashCode()

Serves as the default hash function.

Height(View)

Returns a Dim object tracks the Height of the specified View.

Percent(float, bool)

Creates a percentage Dim object

Sized(int)

Creates an Absolute Dim from the specified integer value.

Width(View)

Returns a Dim object tracks the Width of the specified View.

Operators

operator +(Dim, Dim)

Adds a Dim to a Dim, yielding a new Dim.

implicit operator Dim(int)

Creates an Absolute Dim from the specified integer value.

operator -(Dim, Dim)

Subtracts a Dim from a Dim, yielding a new Dim.