A newer version of this page is available. Switch to the current version.

XtraDialog.Show(XtraDialogArgs) Method

Displays an XtraDialog with the specified settings.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v19.1.dll


public static DialogResult Show(
    XtraDialogArgs args
Public Shared Function Show(
    args As XtraDialogArgs
) As DialogResult


Name Type Description
args DevExpress.XtraEditors.XtraDialogArgs

An XtraDialogArgs object that allows you to dynamically customize the displayed dialog.


Type Description

A DialogResult enumerator value that specifies what dialog button an end-user has clicked.


You can handle the Showing event for the args parameter to dynamically customize the dialog content and buttons. The code below illustrates an example.

XtraDialogArgs args = new XtraDialogArgs();
args.Showing += Args_Showing;
args.Caption = "Default Text";
args.Buttons = new DialogResult[] { DialogResult.OK, DialogResult.Cancel };

private void Args_Showing(object sender, XtraMessageShowingArgs e) {
    e.Form.Text = "Custom Text";
    e.Buttons[DialogResult.OK].Text = "Yes";
    e.Buttons[DialogResult.Cancel].Text = "No";

As a result, the displayed dialog will have content and button captions that differ from those that were initially set.

Dialog - Showing args

See Also