Reputation: 7862
When using the wpf elements of my application, everything styles to the operating system, but when I use an OpenDialog or a MessageBox, it renders the older Windows 9X way. Is there an easier way I can do an Application.EnableVisualStyles() equivalent call to make the message boxes and dialogs look the same as the rest of the application?
Upvotes: 8
Views: 7340
Reputation: 6002
This blog post may be worth a look:
Why does the OpenFileDialog in WPF look so “1999” and how can I fix it?
Upvotes: 4
Reputation: 694
Im my case in used Winforms controls inside WPF then apply EnableVisualStyles()...
Upvotes: 0
Reputation: 39600
You need to add a manifest to your assembly. You can do this via Add New Item-->General-->Application Manifest file.
Then add the following somewhere inside the asmv1 tag in the manifest file:
<dependency>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Windows.Common-Controls" version="6.0.0.0" type="win32" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" />
</dependentAssembly>
</dependency>
Upvotes: 22