Skip to main content

GetLineCount Method

Get the number of lines in the TextBox.

Definition

Namespace: Avalonia.Controls
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)

public int GetLineCount()

Field Value

Int32
number of lines in the TextBox, or -1 if no layout information is available

Remarks

If Wrap == true, changing the width of the TextBox may change this value. The value returned is the number of lines in the entire TextBox, regardless of how many are currently in view.

See Also

Reference

TextBox Class
Avalonia.Controls Namespace