wpf-devexpress-dot-xpf-dot-core-dot-themedwindow-5a510a44.md
Displays the ThemedWindowDialog. A result returned when the window is closed.
Namespace : DevExpress.Xpf.Core
Assembly : DevExpress.Xpf.Core.v25.2.dll
NuGet Package : DevExpress.Wpf.Core
public bool? ShowDialog()
Public Function ShowDialog As Boolean?
| 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.
|
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();
}
Private Sub Button_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim themedWindow As ThemedWindow = New ThemedWindow() With {
.Title = "ThemedWindowDialog" }
themedWindow.ShowDialog()
End Sub
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);
}
Private Sub Button_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim themedWindow As ThemedWindow = New ThemedWindow() With {
.Title = "ThemedWindowDialog" }
themedWindow.ShowDialog(MessageBoxButton.OKCancel)
End Sub
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 snippet (auto-collected from DevExpress Examples) contains a reference 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.
reporting-wpf-print-listview-data/CS/Window1.xaml.cs#L25
link.CreateDocument(true);
preview.ShowDialog();
}
reporting-wpf-print-listview-data/VB/Window1.xaml.vb#L27
link.CreateDocument(True)
preview.ShowDialog()
End Sub
See Also