Table of Contents

Property Braces

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

Braces

Represents an object that implements IEditBraceMatching interface allowing to change appearance of matching braces within the control.

public virtual IEditBraceMatching Braces { get; set; }

Property Value

IEditBraceMatching

Examples

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

using Alternet.Editor.Wpf;

public partial class MainWindow : Window
{
    private void Window_Loaded(object sender, RoutedEventArgs e)
    {
        var textEditor = new Alternet.Editor.Wpf.TextEditor();
        textEditor.Braces.BracesOptions = BracesOptions.HighlightBounds | BracesOptions.TempHighlight;
        textEditor.Braces.BackColor = System.Drawing.Color.Olive;
    }
}

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

Imports Alternet.Editor.Wpf

Partial Public Class MainWindow

    Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
        Dim textEditor = New Alternet.Editor.Wpf.TextEditor()
        textEditor.Braces.BracesOptions = BracesOptions.HighlightBounds Or BracesOptions.TempHighlight
        textEditor.Braces.BackColor = System.Drawing.Color.Olive
    End Sub
End Class

Remarks

TextEditor allows to highlight matching braces - characters like '[', '(', '{' as user navigates through the text.

Braces property allows you to specify the appearance of matching braces.