TextBox.LineCount TextBox.LineCount TextBox.LineCount TextBox.LineCount Property

定义

获取文本框中的总行数。Gets the total number of lines in the text box.

public:
 property int LineCount { int get(); };
public int LineCount { get; }
member this.LineCount : int
Public ReadOnly Property LineCount As Integer

属性值

文本框中的总行数; 如果布局信息不可用, 则为-1。The total number of lines in the text box, or -1 if layout information is not available.

注解

如果启用了文本换行, 则更改文本框的宽度可能会更改此值。If text wrapping is enabled, changing the width of the text box may change this value.

返回的值是文本框中的总行数, 而不考虑当前显示的行数。The value returned is the total number of lines in the text box, regardless of how many are currently visible.

适用于

另请参阅