Table of Contents

Property Outlining

Namespace
Alternet.Editor.Wpf
Assembly
Alternet.Editor.Wpf.v9.dll

Outlining

Represents an object that implements IOutlining interface that specifies appearance and behavior of outline sections within the control.

public IOutlining Outlining { get; }

Property Value

IOutlining

Examples

Here is how to use a Outlining in the C# code:

using Alternet.Syntax.Parsers.Roslyn;
public partial class MainWindow : Window
{
    private void Window_Loaded(object sender, RoutedEventArgs e)
    {
        var textEditor = new Alternet.Editor.Wpf.TextEditor();
        textEditor.Outlining.AllowOutlining = true;
        textEditor.Outlining.OutlineOptions = OutlineOptions.DrawOnGutter | OutlineOptions.DrawLines | OutlineOptions.DrawButtons | OutlineOptions.ShowHints;
        textEditor.Lexer = new CsParser();
    }
}

Here is how to use a Outlining in the Visual Basic code:

Imports Alternet.Syntax.Parsers.Roslyn

Partial Public Class MainWindow

    Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
        Dim textEditor = New Alternet.Editor.Wpf.TextEditor()
        textEditor.Outlining.AllowOutlining = True
        textEditor.Outlining.OutlineOptions = OutlineOptions.DrawOnGutter Or OutlineOptions.DrawLines Or OutlineOptions.DrawButtons Or OutlineOptions.ShowHints
        textEditor.Lexer = New CsParser()
    End Sub
End Class

Remarks

Outline regions allow hiding some text from the view by collapsing a region of code so that it appears under a plus sign (+). You expand a collapsed region by clicking the plus\minus sign.

AllowOutlining property determines whether outlining is enabled in the TextEditor control.

Outline sections are typically provided by SyntaxParser object.