GetLineIndexFromCharacterIndex Method (WPFTextBox)

Class

WPFTextBox.

Action

Returns the zero-based line index for the line that contains the specified character index.

Syntax

C#
lineIndexFromCharacterIndex = textBox.GetLineIndexFromCharacterIndex(charIndex)
VB
lineIndexFromCharacterIndex = textBox.GetLineIndexFromCharacterIndex(charIndex)
Variable Description
lineIndexFromCharacterIndex Integer.
charIndex The zero-based character index for which to retrieve the associated line index. Integer.