Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.06 KB

Border.doc.md

File metadata and controls

36 lines (27 loc) · 1.06 KB

Border

public abstract class Border : UIElement

You can find its source code in Border.cs

Inheritors

1. CharSetBorder class in CharSetBorder.cs

Building

To build Border you should use BorderBuilder. (Its source code is in BorderBuilder.cs)

Here is an example:

using Sunnyyssh.ConsoleUI;

var appBuilder = new ApplicationBuilder(new ApplicationSettings()); // App builder init.

// Border will cover the whole window because of Size.FullSize
// And it will have single line.
var borderBuilder = new BorderBuilder(Size.FullSize, BorderKind.SingleLine) // Creating builder.
{
    Color = Color.Red, // The color of border will be red.
};
    
appBuilder
    .Add(borderBuilder, Position.LeftTop) // Adds borderBuilder at (0, 0) position.
    .Build() // Application builds.
    .Run(); // Application runs.

It runs to this: