WPF and Windows XP Visual Styles

Posted by

Am I the only one who thinks it’s totally lame that Windows Presentation Foundation (aka WPF) has static definitions for Windows XP themes? That means if you have a custom theme⁺ that WPF (and any custom controls you use) does not explicitly support, then you get the crappy Windows 95 look for your supposedly modern WPF application.

I hope this works properly in Vista, because it’s totally crazy!

The workaround? Well, you can force your WPF app to use the Aero theme if you like, but then your app always looks like Aero, rather than every other app running on your computer (which is arguable just as bad as having your app look like Windows 95). Or you can write some custom code to choose a “close” looking theme for every other theme out there. Of course, this only works with themes that you know about, and givens “approximations.”

For this reason alone, I am seriously considering sticking with WinForms for now (at least until I can figure out if the same story is true on Vista – though I haven’t actually seen any other themes for Vista yet...)

⁺ And if you don’t, why not? There’s some damn good ones available for free now-a-days, such as the Zune theme, or the Royale theme - why was the last one removed from Microsoft’s download pages, I wonder?

blog comments powered by Disqus