ShowFormEventArgs.DialogResult Property

Gets or sets the return value of a dialog box.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v21.1.dll


public DialogResult DialogResult { get; set; }

Property Value

Type Description

A DialogResult enumeration value that specifies the value that is returned by the dialog box.


Use the DialogResult property with the ShowFormEventArgs.Handled parameter set to true, to change the return value of the dialog box.


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

private void richEditControl1_SearchFormShowing(object sender, SearchFormShowingEventArgs e)
    string curWord = richEditControl1.Document.GetText(richEditControl1.Document.Selection);
    MySearchTextForm form = new MySearchTextForm(e.ControllerParameters, curWord);
    e.DialogResult = form.ShowDialog();
    e.Handled = true;
See Also