Summary
Initializes a new instance of the
TextLayout
class.
Syntax
public TextLayout(string text, Typeface typeface, double fontSize, IBrush foreground, TextAlignment textAlignment = Left, TextWrapping textWrapping = NoWrap, TextTrimming textTrimming = None, TextDecorationCollection textDecorations = null, double maxWidth = Infinity, double maxHeight = Infinity, double lineHeight = NaN, int maxLines = 0, IReadOnlyList<ValueSpan<TextRunProperties>> textStyleOverrides = null)
Parameters
Name |
Type |
Description |
text |
string |
The text. |
typeface |
Typeface |
The typeface. |
fontSize |
double |
Size of the font. |
foreground |
IBrush |
The foreground. |
textAlignment |
TextAlignment |
The text alignment. |
textWrapping |
TextWrapping |
The text wrapping. |
textTrimming |
TextTrimming |
The text trimming. |
textDecorations |
TextDecorationCollection |
The text decorations. |
maxWidth |
double |
The maximum width. |
maxHeight |
double |
The maximum height. |
lineHeight |
double |
The height of each line of text. |
maxLines |
int |
The maximum number of text lines. |
textStyleOverrides |
IReadOnlyList<ValueSpan<TextRunProperties>> |
The text style overrides. |
Return Value