WPF MessageBox looks unstyled, while WindowsForms MessageBox looks good WPF MessageBox looks unstyled, while WindowsForms MessageBox looks good wpf wpf

WPF MessageBox looks unstyled, while WindowsForms MessageBox looks good


This issue can be fixed by adding an application manifest (Add -> New Item -> Application Manifest File)

    ...</trustInfo><dependency>    <dependentAssembly>        <assemblyIdentity            type="win32"            name="Microsoft.Windows.Common-Controls"            version="6.0.0.0"            processorArchitecture="*"            publicKeyToken="6595b64144ccf1df"            language="*" />    </dependentAssembly></dependency>

Under "Project Properties", point "Manifest" to the file you just created. This is optional for that the manifest can also just be deployed along with the EXE file.

Note: This manifest can be used for any executable, not only WPF, that needs to be "styled".