Property BracesOptions
BracesOptions
Gets or sets options specifying appearance and behavior of matching braces within Edit control.
public virtual BracesOptions BracesOptions { get; set; }
Property Value
Examples
Here is how to use a BracesOptions 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");
textEdit1.Source = this.textSource;
textSource.BracesOptions = BracesOptions.HighlightBounds | BracesOptions.Highlight;
}
}
Here is how to use a BracesOptions 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")
textEdit1.Source = Me.textSource
textSource.BracesOptions = BracesOptions.HighlightBounds Or BracesOptions.Highlight
End Sub
End Class
Remarks
Use BracesOptions to specify matching brace highlighting behavior for TextEditor control, such as highlighting matching braces if the caret is anywhere between them or whether to remove highlighting after a short delay.