Table of Contents

Class EmbedText

Namespace
ConsoleAppVisuals.PassiveElements
Assembly
ConsoleAppVisuals.dll

The EmbedText is a passive element that displays text in a box.

public class EmbedText : PassiveElement
Inheritance
EmbedText
Inherited Members

Remarks

For more information, consider visiting the documentation available here.

Constructors

EmbedText(List<string>, TextAlignment, Placement, BordersType)

The EmbedText is a passive element that displays text in a box.

public EmbedText(List<string> text, TextAlignment align = TextAlignment.Left, Placement placement = Placement.TopCenter, BordersType bordersType = BordersType.SingleStraight)

Parameters

text List<string>

The text to display.

align TextAlignment

The alignment of the Embed text.

placement Placement

The placement of the Embed text element.

bordersType BordersType

The type of border to display.

Remarks

For more information, consider visiting the documentation available here.

Properties

Borders

Gets the borders of the Embed text.

public Borders Borders { get; }

Property Value

Borders

BordersType

Gets the border type of the selector.

public BordersType BordersType { get; }

Property Value

BordersType

Height

Gets the height of the Embed text.

public override int Height { get; }

Property Value

int

Lines

Gets the rows of the Embed text.

public List<string> Lines { get; }

Property Value

List<string>

Placement

Gets the position of the Embed text.

public override Placement Placement { get; }

Property Value

Placement

TextAlignment

Gets the alignment of the Embed text.

public override TextAlignment TextAlignment { get; }

Property Value

TextAlignment

TextToDisplay

Gets the text to display.

public List<string>? TextToDisplay { get; }

Property Value

List<string>

Width

Gets the width of the Embed text.

public override int Width { get; }

Property Value

int

Methods

AddLine(string)

Adds a line to the Embed text.

public void AddLine(string line)

Parameters

line string

The line to add.

Remarks

For more information, consider visiting the documentation available here.

InsertLine(int, string)

Inserts a line to the Embed text.

public void InsertLine(int index, string line)

Parameters

index int

The index where to insert the line.

line string

The line to insert.

Remarks

For more information, consider visiting the documentation available here.

RemoveLine(int)

Removes a line from the Embed text.

public void RemoveLine(int index)

Parameters

index int

The index of the line to remove.

Remarks

For more information, consider visiting the documentation available here.

RemoveLine(string)

Removes a line from the Embed text.

public void RemoveLine(string line)

Parameters

line string

The line to remove.

Remarks

For more information, consider visiting the documentation available here.

RenderElementActions()

Defines the actions to perform when the element is called to be rendered on the console.

[Visual]
protected override void RenderElementActions()

UpdateBordersType(BordersType)

Updates the borders of the Embed text.

public void UpdateBordersType(BordersType bordersType)

Parameters

bordersType BordersType

The new border type of the Embed text.

Remarks

For more information, consider visiting the documentation available here.

UpdateLines(List<string>)

Updates the text of the Embed text.

public void UpdateLines(List<string> newText)

Parameters

newText List<string>

The new text of the Embed text.

Remarks

For more information, consider visiting the documentation available here.

UpdatePlacement(Placement)

Updates the placement of the Embed text.

public void UpdatePlacement(Placement newPlacement)

Parameters

newPlacement Placement

The new placement of the Embed text.

Remarks

For more information, consider visiting the documentation available here.

UpdateTextAlignment(TextAlignment)

Updates the alignment of the Embed text.

public void UpdateTextAlignment(TextAlignment newAlignment)

Parameters

newAlignment TextAlignment

The new alignment of the Embed text.

Remarks

For more information, consider visiting the documentation available here.