TextLayout Class

Represents a multi line text layout.

Definition

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

Properties

Baseline The distance from the top of the first line to the baseline of the first line.
Extent The distance from the topmost black pixel of the first line to the bottommost black pixel of the last line.
Height The distance from the top of the first line to the bottom of the last line.
LetterSpacing Gets the text spacing.
LineHeight Gets or sets the height of each line of text.
MaxHeight Gets the maximum height.
MaxLines Gets the maximum number of text lines.
MaxWidth Gets the maximum width.
OverhangAfter The distance from the bottom of the last line to the extent bottom.
OverhangLeading The maximum distance from the leading black pixel to the leading alignment point of a line.
OverhangTrailing The maximum distance from the trailing black pixel to the trailing alignment point of a line.
TextLines Gets the text lines.
Width The 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.
WidthIncludingTrailingWhitespace The 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.

Methods

DisposeReleases all resources used by the TextLayout
Draw(DrawingContext, Point) Draws the text layout.
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)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetLineIndexFromCharacterIndex(Int32, Boolean) 
GetTypeGets the Type of the current instance.
(Inherited from Object)
HitTestPoint(Point) 
HitTestTextPosition(Int32) Get the pixel location relative to the top-left of the layout box given the text position.
HitTestTextRange(Int32, Int32) 
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also