Skip to main content

ThemedWindow.ShowDialog() Method

Displays the ThemedWindowDialog. A result returned when the window is closed.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Xpf.Core.v24.2.dll

NuGet Package: DevExpress.Wpf.Core

Declaration

public bool? ShowDialog()

Returns

Type Description
Nullable<Boolean>

true, if an end user clicks OK (Yes) in the dialog box; false, if an end user clicks No (Cancel), presses the Esc or the WindowCloseButton [x]; otherwise, null.

Remarks

The following code snippet demonstrates how to display the ThemedWindowDialog without dialog buttons on the button click:

  void Button_Click(object sender, RoutedEventArgs e) {
    ThemedWindow themedWindow = new ThemedWindow() { Title = "ThemedWindowDialog" };
    themedWindow.ShowDialog();
  }

The following code snippet shows how to display the ThemedWindowDialog with the OK and Cancel dialog buttons on the button click:

    void Button_Click(object sender, RoutedEventArgs e) {
      ThemedWindow themedWindow = new ThemedWindow() { Title = "ThemedWindowDialog" };
      themedWindow.ShowDialog(MessageBoxButton.OKCancel);
    }

Note

You should specify the dialog button’s DialogResult property. Refer to Dialog Boxes Overview for more information on the Microsoft dialog boxes.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ShowDialog() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also