Paragraph Class

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




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


Justify? Alignment
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.


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

Extension Methods

T Alignment<Paragraph>(Justify?)
Sets the alignment for an IAlignable object.
T Centered<Paragraph>()
Sets the IAlignable 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 LeftAligned<Paragraph>()
Sets the IAlignable object to be left aligned.
T Overflow<Paragraph>(Overflow)
Sets the overflow strategy.
T RightAligned<Paragraph>()
Sets the IAlignable object to be right aligned.