Property DisplayLines
DisplayLines
Represents the object that implements IDisplayStrings
interface containing collection of lines to be drawn in the control.
[Browsable(false)]
public virtual IDisplayStrings DisplayLines { get; }
Property Value
Examples
Here is how to use a DisplayLines in the C# code:
public partial class MainWindow : Window
{
private void Window_Loaded(object sender, RoutedEventArgs e)
{
var textEditor = new Alternet.Editor.Wpf.TextEditor();
textEditor.LoadFile("myfile.txt");
textEditor.DisplayLines.AllowHiddenLines = true;
for (int i = 5; i <= textEditor.Source.Lines.Count - 5; i++)
{
textEditor.Source.SetLineHidden(i, true);
}
}
}
Here is how to use a DisplayLines in the Visual Basic code:
Partial Public Class MainWindow
Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim textEditor = New Alternet.Editor.Wpf.TextEditor()
textEditor.LoadFile("myfile.txt")
textEditor.DisplayLines.AllowHiddenLines = True
For i As Integer = 5 To textEditor.Source.Lines.Count - 5
textEditor.Source.SetLineHidden(i, True)
Next
End Sub
End Class
Remarks
The DisplayLines collection may differ from Lines that contains text lines. Some of these lines may be absent due to the collapsing of the outline sections, and extra lines may appear due to the word wrapping.