MessageBox theme discrepancies

I’m using Windows 10. I want the top message box to be themed, like the ones with yes/no and ok buttons. I have the following to enable the theme in app.manifest:

<!-- Activate Windows Common Controls v6 usage (XP and Vista): --> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly> </dependency>

This doesn’t seem like it’s related to MonoGame at all.

To my understanding, theme relates to the visual appearance of the message box and the OS itself controls this. I think you can override some stuff in a WinForms project but it’s been a while since I’ve messed with it.

It sounds like you’re talking specifically about the buttons though… and this is something, at least from a System.Windows.Forms.MessageBox perspective, that is specified when you call it.

One of the parameters to MessageBox.Show is an enum value for MessageBoxButtons.



Using the MessageBoxButtons enum, you can specify which buttons you want to appear on your MessageBox. I’m not sure if this is portable though, so be cautious :slight_smile:

Late update:

I should have shared some code.

                    var res = MessageBox.Show(e.Message, "Something went wrong",
                        MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Error,
                        MessageBoxDefaultButton.Button2, MessageBoxOptions.ServiceNotification
                    );```
Turns out that specifying the service notification disrupts the theme.