Table of Contents

Property Braces

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

Braces

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

[TypeConverter(typeof(ExpandableObjectConverter))]
public virtual IEditBraceMatching Braces { get; set; }

Property Value

IEditBraceMatching

Examples

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

using Alternet.Editor.TextSource;

public partial class Form1 : Form
{
    private void Form1_Load(object sender, EventArgs e)
    {
        var syntaxEdit1 = new Alternet.Editor.SyntaxEdit(this.components);
        syntaxEdit1.Braces.BracesOptions = BracesOptions.HighlightBounds | BracesOptions.TempHighlight;
        syntaxEdit1.Braces.BackColor = System.Drawing.Color.Olive;
    }
}

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

Imports Alternet.Editor.TextSource

Partial Public Class Form1
    Inherits Form

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
        Dim syntaxEdit1 = New Alternet.Editor.SyntaxEdit(Me.components)
        syntaxEdit1.Braces.BracesOptions = BracesOptions.HighlightBounds Or BracesOptions.TempHighlight
        syntaxEdit1.Braces.BackColor = System.Drawing.Color.Olive
    End Sub
End Class

Remarks

SyntaxEdit allows user to highlight matching braces - characters like '[', '(', '{' as they navigate through the text.

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