Table of Contents

Property HighlightReferences

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

HighlightReferences

Specifies that edit control should highlight found references.

public virtual bool HighlightReferences { get; set; }

Property Value

bool

Examples

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

using Alternet.Editor;
using Alternet.Editor.TextSource;

public partial class Form1 : Form
{
    private TextSource textSource;
    private void Form1_Load(object sender, EventArgs e)
    {
        var syntaxEdit = new SyntaxEdit(this.components);
        textSource = new TextSource(this.components);
        textSource.LoadFile("myfile.txt");

        textSource.HighlightReferences = true;
        syntaxEdit.Source = this.textSource;
    }
}

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

Imports Alternet.Editor
Imports Alternet.Editor.TextSource

Partial Public Class Form1
    Inherits Form

    Private textSource As TextSource

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
        Dim syntaxEdit = New SyntaxEdit(Me.components)
        textSource = New TextSource(Me.components)
        textSource.LoadFile("myfile.txt")
        textSource.HighlightReferences = True
        syntaxEdit.Source = Me.textSource
    End Sub
End Class

Remarks

Set HighlightReferences property to true to enable the highlighting of all occurrences of the symbol under the caret, like a local variable, parameter, property, or field by the SyntaxEdit control linked to this TextSource