ITextView.TextViewLines Property


Gets a read-only list of the ITextViewLine objects rendered in this view.

Namespace:   Microsoft.VisualStudio.Text.Editor
Assembly:  Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)

ITextViewLineCollection TextViewLines { get; }

Property Value

Type: Microsoft.VisualStudio.Text.Editor.ITextViewLineCollection

The collection of text view lines.

Exception Condition

The view is in the process of being laid out.

This list will be dense, meaning that all the characters between the first character of the first ITextViewLine through the last character of the last ITextViewLine are represented in one of the ITextViewLine objects, except when the layout of the ITextViewLine objects is in progress.

ITextViewLine objects are disjoint, meaning that a given character is part of only one ITextViewLine.

The ITextViewLine objects are sorted by the index of their first character. Some of the ITextViewLine objects may not be visible, and all ITextViewLine objects are disposed of when the view recalculates its layout.

Return to top