Outlining Property
Outlining
Represents an object that implements IOutlining
interface that specifies appearance and behavior of outline sections within the control.
Declaration
public IOutlining Outlining { get; }
Property Value
Type | Description |
---|---|
IOutlining |
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.
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