Property ClosingBraces
ClosingBraces
Gets or sets an array of characters each one representing a closing brace.
public virtual char[] ClosingBraces { get; set; }
Property Value
- char[]
Examples
Here is how to use a ClosingBraces in the C# code:
using System;
using System.Windows;
using Alternet.Editor.Wpf;
public partial class MainWindow : Window
{
private TextSource textSource;
private void Window_Loaded(object sender, RoutedEventArgs e)
{
var textEdit1 = new TextEditor();
textSource = new TextSource();
textSource.LoadFile("myfile.txt");
textSource.OpenBraces = new char[] { '(', '[', '{' };
textSource.ClosingBraces = new char[] { ')', ']', '}' };
textEdit1.Source = this.textSource;
}
}
Here is how to use a ClosingBraces in the Visual Basic code:
Imports System
Imports System.Windows
Imports Alternet.Editor.Wpf
Partial Public Class MainWindow
Inherits Window
Private textSource As TextSource
Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim textEdit1 = New TextEditor()
textSource = New TextSource()
textSource.LoadFile("myfile.txt")
textSource.OpenBraces = New Char() {"("c, "["c, "{"c}
textSource.ClosingBraces = New Char() {")"c, "]"c, "}"c}
textEdit1.Source = Me.textSource
End Sub
End Class
Remarks
Use ClosingBraces property to configure which type of matching braces to be highlighted.
This property should be modified together with the OpenBraces property.