TextLine Class

Represents a line of text that is used for text rendering.

Definition

Namespace: Avalonia.Media.TextFormatting
Assembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public abstract class TextLine : IDisposable
Inheritance
Object    TextLine
Implements
IDisposable

Properties

Baseline Gets the distance from the top to the baseline of the current TextLine object.
Extent Gets the distance from the top-most to bottom-most black pixel in a line.
FirstTextSourceIndex Gets the first TextSource position of the current line.
HasCollapsed Gets a value that indicates whether the line is collapsed.
HasOverflowed Gets a value that indicates whether content of the line overflows the specified paragraph width.
Height Gets the height of a line of text.
Length Gets the total number of TextSource positions of the current line.
NewLineLength Gets the number of newline characters at the end of a line.
OverhangAfter Gets the distance that black pixels extend beyond the bottom alignment edge of a line.
OverhangLeading Gets the distance that black pixels extend prior to the left leading alignment edge of the line.
OverhangTrailing Gets the distance that black pixels extend following the right trailing alignment edge of the line.
Start Gets the distance from the start of a paragraph to the starting point of a line.
TextLineBreak Gets the state of the line when broken by line breaking process.
TextRuns Gets the text runs that are contained within a line.
TrailingWhitespaceLength Gets the number of whitespace code points beyond the last non-blank character in a line.
Width Gets the width of a line of text, excluding trailing whitespace characters.
WidthIncludingTrailingWhitespace Gets the width of a line of text, including trailing whitespace characters.

Methods

Collapse(TextCollapsingProperties) Create a collapsed line based on collapsed text properties.
DisposeReleases all resources used by the TextLine
Draw(DrawingContext, Point) Draws the TextLine at the given origin.
Equals(Object)Determines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetBackspaceCaretCharacterHit(CharacterHit) Gets the previous character hit after backspacing.
GetCharacterHitFromDistance(Double) Gets the character hit corresponding to the specified distance from the beginning of the line.
GetDistanceFromCharacterHit(CharacterHit) Gets the distance from the beginning of the line to the specified character hit. CharacterHit.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetNextCaretCharacterHit(CharacterHit) Gets the next character hit for caret navigation.
GetPreviousCaretCharacterHit(CharacterHit) Gets the previous character hit for caret navigation.
GetTextBounds(Int32, Int32) Get an array of bounding rectangles of a range of characters within a text line.
GetTypeGets the Type of the current instance.
(Inherited from Object)
Justify(JustificationProperties) Create a justified line based on justification text properties.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also