Back to Devexpress

ThemedMessageBox.Show(Window, String, UIElement, MessageBoxButton, Nullable<MessageBoxResult>, MessageBoxImage, Boolean, MessageBoxOptions, WindowStartupLocation, WindowTitleAlignment, Nullable<Boolean>) Method

wpf-devexpress-dot-xpf-dot-core-dot-themedmessagebox-dot-g-g-4-h-u-f.md

latest5.1 KB
Original Source

ThemedMessageBox.Show(Window, String, UIElement, MessageBoxButton, Nullable<MessageBoxResult>, MessageBoxImage, Boolean, MessageBoxOptions, WindowStartupLocation, WindowTitleAlignment, Nullable<Boolean>) Method

Displays a ThemedMessageBox window. 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 static MessageBoxResult Show(
    Window owner = null,
    string title = null,
    UIElement messageContent = null,
    MessageBoxButton messageBoxButtons = MessageBoxButton.OKCancel,
    MessageBoxResult? defaultButton = null,
    MessageBoxImage icon = MessageBoxImage.None,
    bool usePngImages = false,
    MessageBoxOptions options = MessageBoxOptions.None,
    WindowStartupLocation windowStartupLocation = WindowStartupLocation.CenterOwner,
    WindowTitleAlignment titleAlignment = WindowTitleAlignment.Left,
    bool? showActivated = null
)
vb
Public Shared Function Show(
    owner As Window = Nothing,
    title As String = Nothing,
    messageContent As UIElement = Nothing,
    messageBoxButtons As MessageBoxButton = MessageBoxButton.OKCancel,
    defaultButton As MessageBoxResult? = Nothing,
    icon As MessageBoxImage = MessageBoxImage.None,
    usePngImages As Boolean = False,
    options As MessageBoxOptions = MessageBoxOptions.None,
    windowStartupLocation As WindowStartupLocation = WindowStartupLocation.CenterOwner,
    titleAlignment As WindowTitleAlignment = WindowTitleAlignment.Left,
    showActivated As Boolean? = Nothing
) As MessageBoxResult

Optional Parameters

NameTypeDefaultDescription
ownerWindownull

The window that owns the ThemedMessageBox.

| | title | String | null |

The window’s header text.

| | messageContent | UIElement | null |

The window’s message content.

| | messageBoxButtons | MessageBoxButton | OKCancel |

A set of buttons displayed in the ThemedMessageBox.

| | defaultButton | Nullable<MessageBoxResult> | null |

The ThemedMessageBox‘s default button. This button is focused when the ThemedMessageBox is shown.

| | icon | MessageBoxImage | None |

An image displayed in the ThemedMessageBox.

| | usePngImages | Boolean | False |

true to use an image in the PNG format instead of SVG; otherwise, false.

| | options | MessageBoxOptions | None |

The ThemedMessageBox‘s display and association options.

| | windowStartupLocation | WindowStartupLocation | CenterOwner |

The ThemedMessageBox‘s position when it starts.

| | titleAlignment | WindowTitleAlignment | Left |

The header text alignment.

| | showActivated | Nullable<Boolean> | null |

true to activate the window when it is first shown; false to deactivate the window when it is first shown; null to use the framework’s ShowActivated value.

|

Returns

TypeDescription
MessageBoxResult

The ThemedMessageBox result value.

|

See Also

ThemedMessageBox Class

ThemedMessageBox Members

DevExpress.Xpf.Core Namespace