Back to Devexpress

ThemedWindow.ShowDialog(MessageBoxButton, Nullable<MessageBoxResult>) Method

wpf-devexpress-dot-xpf-dot-core-dot-themedwindow-dot-showdialog-x28-system-dot-windows-dot-messageboxbutton-system-dot-nullable-system-dot-windows-dot-messageboxresult-x29.md

latest2.6 KB
Original Source

ThemedWindow.ShowDialog(MessageBoxButton, Nullable<MessageBoxResult>) Method

Displays the ThemedWindowDialog with the specified MessageBoxButton. A result returned when the window is closed.

Namespace : DevExpress.Xpf.Core

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public MessageBoxResult ShowDialog(
    MessageBoxButton dialogButtons,
    MessageBoxResult? defaultButton = null
)
vb
Public Function ShowDialog(
    dialogButtons As MessageBoxButton,
    defaultButton As MessageBoxResult? = Nothing
) As MessageBoxResult

Parameters

NameTypeDescription
dialogButtonsMessageBoxButton

Buttons to display in the message box.

|

Optional Parameters

NameTypeDefaultDescription
defaultButtonNullable<MessageBoxResult>null

A default button for the message box.

|

Returns

TypeDescription
MessageBoxResult

The ThemedWindowDialog ‘s result value.

|

Remarks

The following code snippet shows how to display a ThemedWindowDialog with the OK and Cancel buttons:

csharp
ThemedWindow themedWindow = new ThemedWindow() { Title = "ThemedWindowDialog" };
MessageBoxResult result = themedWindow.ShowDialog(MessageBoxButton.OKCancel);
vb
Private Sub SurroundingSub()
  Dim themedWindow As ThemedWindow = New ThemedWindow() With {
      .Title = "ThemedWindowDialog" }
  Dim result As MessageBoxResult = themedWindow.ShowDialog(MessageBoxButton.OKCancel)
End Sub

See Also

ThemedWindow Class

ThemedWindow Members

DevExpress.Xpf.Core Namespace