Paragraph Class

A paragraph of text where different parts of the paragraph can have individual styling.
public sealed class Paragraph : Renderable, IRenderable, IHasJustification, IOverflowable

Constructors

Paragraph()
Initializes a new instance of the Paragraph class.
Paragraph(string, Style)
Initializes a new instance of the Paragraph class.

Properties

Justify? Justification
Gets or sets the alignment of the whole paragraph.
int Length
Gets the character count of the paragraph.
int Lines
Gets the number of lines in the paragraph.
Overflow? Overflow
Gets or sets the text overflow strategy.

Methods

Paragraph Append(string, Style)
Appends some text to this paragraph.
protected override Measurement Measure(RenderOptions, int)
Measures the renderable object.
protected override IEnumerable<Segment> Render(RenderOptions, int)
Renders the object.

Extension Methods

T Centered<Paragraph>()
Sets the IHasJustification object to be centered.
T Crop<Paragraph>()
Crops any overflowing text.
T Ellipsis<Paragraph>()
Crops any overflowing text and adds an ellipsis to the end.
T Fold<Paragraph>()
Folds any overflowing text.
IEnumerable<Segment> GetSegments(IAnsiConsole)
Gets the segments for a renderable using the specified console.
T Justify<Paragraph>(Justify?)
Sets the justification for an IHasJustification object.
T LeftJustified<Paragraph>()
Sets the IHasJustification object to be left justified.
T Overflow<Paragraph>(Overflow)
Sets the overflow strategy.
T RightJustified<Paragraph>()
Sets the IHasJustification object to be right justified.