Summary
Represents a piece of text with formatting.
- Namespace
- Avalonia
.Media - Base Types
-
- object
graph BT
Type-->Base0["object"]
Type["FormattedText"]
class Type type-node
Syntax
public class FormattedText
Constructors
Name | Summary |
---|---|
FormattedText |
Initializes a new instance of the FormattedText class.
|
FormattedText |
Initializes a new instance of the FormattedText class.
|
FormattedText |
Initializes a new instance of the FormattedText class.
|
Properties
Name | Value | Summary |
---|---|---|
Bounds | Rect |
Gets the bounds of the text within the
Constraint .
|
Constraint | Size |
Gets or sets the constraint of the text.
|
FontSize | double |
Gets or sets the font size.
|
PlatformImpl | IFormattedTextImpl |
Gets platform-specific platform implementation.
|
Spans | IReadOnlyList |
Gets or sets a collection of spans that describe the formatting of subsections of the
text.
|
Text | string |
Gets or sets the text.
|
TextAlignment | TextAlignment |
Gets or sets the alignment of the text.
|
TextWrapping | TextWrapping |
Gets or sets the text wrapping.
|
Typeface | Typeface |
Gets or sets the base typeface.
|
Methods
Name | Value | Summary |
---|---|---|
GetLines |
IEnumerable |
Gets the lines in the text.
|
HitTestPoint |
TextHitTestResult |
Hit tests a point in the text.
|
HitTestTextPosition |
Rect |
Gets the bounds rectangle that the specified character occupies.
|
HitTestTextRange |
IEnumerable |
Gets the bounds rectangles that the specified text range occupies.
|