• HOME
  • PRODUCTS
  • DEMOS
  • BUY
  • BLOG
  • FORUM
  • DOCUMENTATION
  • ABOUT
  • FREE EVALUATION
Search Results for

    Show / Hide Table of Contents

    SearchDialog Property

    SearchDialog

    Gets or sets a dialog box allowing to search for the text or replace it.

    Declaration
    [Browsable(false)]
    public virtual ISearchDialog SearchDialog { get; set; }
    Property Value
    Type Description
    ISearchDialog
    Implements
    ISearch.SearchDialog
    Remarks

    SearchDialog provides search and replace capabilities to TextEditor control.

    Use SearchSettings to customize search and replace behavior.

    By default, the search dialog is displayed as a popup panel at the top-right corner of TextEditor control. You can override it to be displayed as a separate dialog box by setting SearchDialogAppearance property.

    Examples

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

    public partial class MainWindow : Window
    {
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            var textEditor = new Alternet.Editor.Wpf.TextEditor();
            textEditor.LoadFile("myfile.txt");
            textEditor.SearchDialogAppearance = Alternet.Editor.Wpf.SearchDialogAppearance.PopupPanel;
            textEditor.SearchDialog.SearchSettings.SearchOptions |= Alternet.Editor.Wpf.SearchOptions.CaseSensitive | Alternet.Editor.Wpf.SearchOptions.FindTextAtCursor;
        }
    }
    

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

    Partial Public Class MainWindow
    
        Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
            Dim textEditor = New Alternet.Editor.Wpf.TextEditor()
            textEditor.LoadFile("myfile.txt")
            textEditor.SearchDialogAppearance = Alternet.Editor.Wpf.SearchDialogAppearance.PopupPanel
            textEditor.SearchDialog.SearchSettings.SearchOptions = textEditor.SearchDialog.SearchSettings.SearchOptions Or Alternet.Editor.Wpf.SearchOptions.CaseSensitive Or Alternet.Editor.Wpf.SearchOptions.FindTextAtCursor
        End Sub
    End Class
    
    In This Article
    Back to top Copyright AlterNET Software Download PDF