• HOME
  • PRODUCTS
  • DEMOS
  • BUY
  • BLOG
  • FORUM
  • DOCUMENTATION
  • ABOUT
  • FREE EVALUATION
Search Results for

    Show / Hide Table of Contents

    DisplayLines Property

    DisplayLines

    Represents the object that implements IDisplayStrings interface containing collection of lines to be drawn in the control.

    Declaration
    [Browsable(false)]
    public virtual IDisplayStrings DisplayLines { get; }
    Property Value
    Type Description
    IDisplayStrings
    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.

    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
    
    In This Article
    Back to top Copyright AlterNET Software Download PDF