API Reference
Class
StyledText
Multi-line styled text: the result of parsing markup or splitting plain text into lines.
Inheritance
- Object
- StyledText
Usage
Explore 7 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 6
- Method RenderContext.Markup
- Method SymbolFallback.Apply
- Method Markup.Parse
- Method RichText.ToStyledText
- Method StyledText.FromPlain
- Method StyledText.FromSpans
Accepted by parameters 1
- Method SymbolFallback.Apply
Constructors
public StyledText(IReadOnlyList<StyledLine> lines) #Creates styled text from lines.
Parameters
- lines System.Collections.Generic.IReadOnlyList<ConsoleMonster.Text.StyledLine>
- The lines.
Methods
public static StyledText FromPlain(String? text, Style style = default) #Returns:
StyledTextSplits plain text (no markup) into lines with one style.
Parameters
- text System.String?
- The text; \r\n, \n and \r separate lines.
- style ConsoleMonster.Styling.Style = default
- The style.
Returns
Styled text.
public static StyledText FromSpans(IEnumerable<TextSpan> spans) #Returns:
StyledTextCreates styled text from spans that may contain line breaks.
Parameters
- spans System.Collections.Generic.IEnumerable<ConsoleMonster.Text.TextSpan>
- The spans.
Returns
Styled text.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?