Table of Contents

Property Length

Namespace
Terminal.Gui.Views
Assembly
Terminal.Gui.dll

Length

Gets or sets the length of the line along its orientation.

public Dim Length { get; set; }

Property Value

Dim

Remarks

This is the "source of truth" for the line's primary dimension. For a horizontal line, Length controls Width. For a vertical line, Length controls Height.

When Width or Height is set directly, Length is updated to match the primary dimension. When Orientation changes, the appropriate dimension is set to Length and the perpendicular dimension is set to 1.

This property provides a cleaner API for controlling the line's extent without needing to know whether to use Width or Height.