Skip to main content

SearchFormShowingEventArgs.ControllerParameters Property

Gets the information for initializing the Find and Replace dialog controls.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v24.2.dll

Declaration

public SearchFormControllerParameters ControllerParameters { get; }

Property Value

Type Description
DevExpress.XtraRichEdit.Forms.SearchFormControllerParameters

A DevExpress.XtraRichEdit.Forms.SearchFormControllerParameters object containing information to be displayed in the form.

Example

This example demonstrates how handle the RichEditControl.SearchFormShowing event to replace the standard Find and Replace dialog with a custom dialog.

private void richEditControl1_SearchFormShowing(object sender, SearchFormShowingEventArgs e)
{
    string curWord = richEditControl.Document.GetText(richEditControl.Document.Selection);
    using (MySearchTextForm form = new MySearchTextForm(e.ControllerParameters, curWord))
    {
        e.DialogResult = form.ShowDialog();
        e.Handled = true;
    }
}
using System.Drawing;
using DevExpress.XtraRichEdit.Forms;

namespace CustomDialogs
{
    public partial class MySearchTextForm : SearchTextForm
    {
        public MySearchTextForm(SearchFormControllerParameters controllerParameters, string searchWord)
            : base(controllerParameters)
        {
            lblFndDirection.Location = new Point (lblFndDirection.Location.X - 10, lblFndDirection.Location.Y);
            lblFndDirection.Text = "Direction:";
            cbFndSearchString.Text = searchWord;
            chbFndRegex.Enabled = false;
        }
    }
}
See Also