System.Console.WindowLeft Property

Gets or sets the leftmost position of the console window area relative to the screen buffer.

Syntax

public static int WindowLeft { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

The console represents a rectangular window into a larger rectangular buffer area. Both the window and the buffer are measured vertically by their number of rows and horizontally by their number of columns. The dimensions of the buffer area are defined by the Console.BufferHeight and Console.BufferWidth properties. The dimensions of the console area are defined by the Console.WindowHeight and Console.WindowWidth properties. The Console.WindowLeft property determines which column of the buffer area is displayed in the first column of the console window. The value of the Console.WindowLeft property can range from 0 to Console.BufferWidth - Console.WindowWidth. Attempting to set it to a value outside that range throws an ArgumentOutOfRangeException.

When a console window first opens, the default value of the Console.WindowLeft property is zero, which indicates that the first column shown by the console corresponds to the first column (the column at position zero) in the buffer area. The default width of both the console window and the buffer area is 80 columns. This means that the Console.WindowLeft property can be modified only if the console window is made narrower or the buffer area is made wider.

Note that if the width of the buffer area exceeds the width of the console window, the value of the Console.WindowLeft property is automatically adjusted when the user uses the horizontal scroll bar to define the window's relationship to the buffer area.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0