Themed MessageBox

Ribbon for WPF Forum

Posted 2 years ago by Procam
Version: 22.1.4

Hello, is there some way how to display a themed MessageBox popup window?

The System.Windows.MessageBox(...) seems to display the computer theme color. I would like this popup window to be themed also when I change the theme through:

ThemeManager.CurrentTheme = ThemeNames.MetroDark;

Thanks for any hint!

[Modified 2 years ago]

Comments (2)

Posted 2 years ago by Procam

Ok, I found there is already a ThemedMessageBox.

But how to deal with the MessageBoxOptions when using:

result = ActiproSoftware.Windows.Controls.MessageBox.Show(message, ApplicationInfo.ProductName, MessageBoxButton.YesNo,
MessageBoxImage.Question, MessageBoxResult.No, MessageBoxOptions);

I found no overridden method for this.

Answer - Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA


Yes our recent versions have a new wonderful user prompt control that supports everything from easy replacement of MessageBox with full themes, all the way up to building more complex task dialogs.  Here is its documentation topic and we have a bunch of sample usage examples in the Sample Browser.

As for MessageBoxOptions usage, that documentation topic has a note saying overloads which accept MessageBoxOptions are not implemented by ThemedMessageBox since the functionality enabled by those options is not necessary for WPF windows. When converting, exclude any arguments for MessageBoxOptions and test your application for expected behavior.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.