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
TextAlignmentThe alignment of the Embed text.
placement
PlacementThe placement of the Embed text element.
bordersType
BordersTypeThe 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
BordersType
Gets the border type of the selector.
public BordersType BordersType { get; }
Property Value
Height
Gets the height of the Embed text.
public override int Height { get; }
Property Value
Lines
Gets the rows of the Embed text.
public List<string> Lines { get; }
Property Value
Placement
Gets the position of the Embed text.
public override Placement Placement { get; }
Property Value
TextAlignment
Gets the alignment of the Embed text.
public override TextAlignment TextAlignment { get; }
Property Value
TextToDisplay
Gets the text to display.
public List<string>? TextToDisplay { get; }
Property Value
Width
Gets the width of the Embed text.
public override int Width { get; }
Property Value
Methods
AddLine(string)
Adds a line to the Embed text.
public void AddLine(string line)
Parameters
line
stringThe 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
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
intThe 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
stringThe 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
BordersTypeThe 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
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
PlacementThe 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
TextAlignmentThe new alignment of the Embed text.
Remarks
For more information, consider visiting the documentation available here.