Vista MessageBox
Hello,
I am using WPF on Vista. However, when I call MessageBox.Show, the message box on the screen is using the Windows 2000 theme (gray). Is there a way to have "nice looking" vista message boxes in WPF.
Hello,
I am using WPF on Vista. However, when I call MessageBox.Show, the message box on the screen is using the Windows 2000 theme (gray). Is there a way to have "nice looking" vista message boxes in WPF.
The rest of the app is using the Vista theme.
I don't use any template.
Am I the only one to get this behavior?
Hello, WPF MessageBox uses Win32 MessageBox. That means, it doesn’t use WPF themes. The same goes with other common dialogs such as OpenFileDialog. To enable aero theme on those Win32 dialogs, you need to add a manifest file to your application, and add the following:
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
</dependentAssembly>
</dependency>
Now rebuild your application and run it, your MessageBox should have aero theme. But when you debugging the application, the aero theme seems still not be applied to common dialogs. Only when running the application without debugging will it be applied.
To logN: http://blogs.msdn.com/subhagpo/archive/2004/05/17/133464.aspx