Skip to main content

ThemedMessageBox Class

A message box that shows a message to end users.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Xpf.Core.v22.1.dll

NuGet Package: DevExpress.Wpf.Core

Declaration

public static class ThemedMessageBox

Remarks

ThemedMessageBox is a Window descendant. This modal window blocks other actions in the application until an end user closes it.

You should not create a new instance of the ThemedMessageBox class. Call one of the static Show methods to display a ThemedMessageBox. Parameters that you pass to this method determine the ThemedMessageBox‘s title, message, buttons, icon, etc.

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

private void Button_Click(object sender, RoutedEventArgs e) {
  ThemedMessageBox.Show(title: "Dialog Header", text:"This is your message", messageBoxButtons: MessageBoxButton.OKCancel, icon: MessageBoxImage.Exclamation);
}

The image below illustrates the result:

ThemedMessageBox-result

To display a ThemedMessageBox in a separate Thread, you should set the Thread‘s ApartmentState to ApartmentState.STA with the Thread.SetApartmentState(System.Threading.ApartmentState) method.

Inheritance

Object
ThemedMessageBox
See Also