Table of Contents

Property SearchResults

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

SearchResults

Gets or sets IRangeList of search results for Edit control.

[Browsable(false)]
public virtual IRangeList SearchResults { get; set; }

Property Value

IRangeList

Examples

Here is how to use a SearchResults 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.HighlightSearchResults = true;

        textEdit1.Source = this.textSource;
    }
}

Here is how to use a SearchResults 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.HighlightSearchResults = True

        textEdit1.Source = Me.textSource
    End Sub
End Class

Remarks

SearchResults property contains a collection of the text fragments, highlighted when performing search operations by the linked TextEditor control.