Skip to main content
A newer version of this page is available. .

ThemedMessageBox.Show(String, String, MessageBoxButton) Method

Displays a ThemedMessageBox window. A result returned when the window is closed.

Namespace: DevExpress.Xpf.Core

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

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Core, DevExpress.Wpf.Core

Declaration

public static MessageBoxResult Show(
    string title,
    string text,
    MessageBoxButton messageBoxButtons
)

Parameters

Name Type Description
title String

The window’s header text.

text String

The window’s message text.

messageBoxButtons MessageBoxButton

A set of buttons displayed in the ThemedMessageBox.

Returns

Type Description
MessageBoxResult

The ThemedMessageBox result value.

Remarks

The following code snippet demonstrates how to display a ThemedMessageBox window on the button click:

void Button_Click(object sender, RoutedEventArgs e) {
  ThemedMessageBox.Show("Dialog Header", "This is your message", MessageBoxButton.OKCancel);
}

The image below illustrates the result:

ThemedMessageBox-result

The code snippet below demonstrates how to use the Show method’s return value to change the button’s content:

void Button_Click(object sender, RoutedEventArgs e) {
 MessageBoxResult result;
 result = ThemedMessageBox.Show("Button properties", "Do you want to rename this button", MessageBoxButton.YesNo );
 if(result == MessageBoxResult.Yes) {
  button.Content = "Open text editor"; }
}
See Also