Skip to main content

FormattedText Properties

Properties

BaselineThe distance from the top of the first line to the baseline of the first line.
ExtentThe distance from the topmost black pixel of the first line to the bottommost black pixel of the last line.
FlowDirectionDefines the flow direction
HeightThe distance from the top of the first line to the bottom of the last line.
LineHeightGets or sets the height of, or the spacing between, each line where zero represents the default line height.
MaxLineCountDefines the maximum number of lines to display. The last line of text displayed is the lineCount-1'th line, or the last whole line that will fit within the count set by MaxTextHeight, whichever occurs first. Use the Trimming property to control how the omission of text is indicated
MaxTextHeightSets the maximum length of a column of text. The last line of text displayed is the last whole line that will fit within this limit, or the nth line as specified by MaxLineCount, whichever occurs first. Use the Trimming property to control how the omission of text is indicated.
MaxTextWidthThe MaxTextWidth property defines the alignment edges for the FormattedText. For example, left aligned text is wrapped such that the leftmost glyph alignment point on each line falls exactly on the left edge of the rectangle. Note that for many fonts, especially in italic style, some glyph strokes may extend beyond the edges of the alignment rectangle. For this reason, it is recommended that clients draw text with at least 1/6 em (i.e of the font size) unused margin space either side. Zero value of MaxTextWidth is equivalent to the maximum possible paragraph width.
OverhangAfterThe distance from the bottom of the last line to the extent bottom.
OverhangLeadingThe maximum distance from the leading black pixel to the leading alignment point of a line.
OverhangTrailingThe maximum distance from the trailing black pixel to the trailing alignment point of a line.
TextAlignmentDefines the alignment of text within the column
TrimmingDefines how omission of text is indicated. CharacterEllipsis trimming allows partial words to be displayed, while WordEllipsis removes whole words to fit. Both guarantee to include an ellipsis ('...') at the end of the lines where text has been trimmed as a result of line and column limits.
WidthThe maximum advance width between the leading and trailing alignment points of a line, excluding the width of whitespace characters at the end of the line.
WidthIncludingTrailingWhitespaceThe maximum advance width between the leading and trailing alignment points of a line, including the width of whitespace characters at the end of the line.

See Also

Reference

FormattedText Class
Avalonia.Media Namespace