Skip to main content

ITextLine Interface

Definition​

Assembly:Avalonia.Controls.Documents
Package:Avalonia.Controls.Documents

Represents a single visual line of formatted text.

public interface ITextLine

Properties​

NameDescription
BaselineGets the baseline offset from the top of the line.
BoundsGets the bounding rectangle of this line in view coordinates.
ContainingElementGets the node whose content this line belongs to, if any. Selection rendering and vertical navigation group lines by it, so a line that reports none is skipped by both.
EndPositionGets the end position of this line as a lightweight value type.
HasLineBreakGets whether this line ends with a hard line break.
HeightGets the height of this line.
LengthGets the character length of text in this line.
StartPositionGets the start position of this line as a lightweight value type.
WidthGets the width of this line.

Baseline Property​

Gets the baseline offset from the top of the line.

public double Baseline { get; set; }

Bounds Property​

Gets the bounding rectangle of this line in view coordinates.

public Avalonia.Rect Bounds { get; set; }

ContainingElement Property​

Gets the node whose content this line belongs to, if any. Selection rendering and vertical navigation group lines by it, so a line that reports none is skipped by both.

public object ContainingElement { get; set; }

Remarks​

Defaults to so a line written before this member existed still compiles. Such a line is skipped by selection rendering and by vertical navigation, which is the same treatment it received before the member was added.

EndPosition Property​

Gets the end position of this line as a lightweight value type.

public Avalonia.Controls.Documents.TextModel.StaticTextPointer EndPosition { get; set; }

HasLineBreak Property​

Gets whether this line ends with a hard line break.

public bool HasLineBreak { get; set; }

Height Property​

Gets the height of this line.

public double Height { get; set; }

Length Property​

Gets the character length of text in this line.

public int Length { get; set; }

StartPosition Property​

Gets the start position of this line as a lightweight value type.

public Avalonia.Controls.Documents.TextModel.StaticTextPointer StartPosition { get; set; }

Width Property​

Gets the width of this line.

public double Width { get; set; }