Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

A while ago, I decided to patch my uxtheme.dll (using the Universal Theme Patcher) to allow for use of unofficial window themes. The problem is that WPF applications seem to ignore the custom theme for native Windows controls (such as scrollbars and buttons) and instead use the classic theme for them.

I first noticed this with Visual Studio 2010:

Visual Studio

I thought it was a bug in the program itself, but creating my own WPF application gives the same result:

Custom WPF app

Googling reveals that I'm not the only person with this issue, but I haven't found a solution.

Is there anything I can do about it? Should I try a different uxtheme.dll patcher? Or is this what I get for trying to [gasp] customize Windows?

share|improve this question
    
so that’s the reason. trying to make windows a bit prettier makes wpf apps uglier -.- well, going back to aero after using soft7 isn’t possible (i tried, but i think i puked a little into my mouth ;)) so i’ll have to live with it. –  flying sheep Dec 19 '11 at 10:26
    
@flyingsheep: Yep, that's what it comes down to. Fortunately for me, the only WPF application I use regularly is Visual Studio, and the impact is really minimal in it, so I hardly notice it. On a larger scale, though, with lots of WPF apps, I imaging it would get really annoying. –  Sasha Chedygov Dec 20 '11 at 8:55

3 Answers 3

up vote 2 down vote accepted

Currently there isn't anything you can do about it. WPF applications have their own theme [which isn't coupled with Windows' theme]. The best thing I could suggest is that you write an app or create your own dll that makes the WPF theme change to the one you like, you'd get a lot of recognition for that ;)

share|improve this answer
    
Hmm, that's really interesting, I didn't know that. I'll see what I can do. :) –  Sasha Chedygov Aug 2 '10 at 23:51
    
Confirmed. WPF contains a version of each built-in Windows theme translated to XAML. I'm not sure why in the hell they would do something like that (I guess so you could override system styles?), but there isn't much I can do about it. You could theoretically write an application that takes the .theme file of the custom theme you're using and translates it into a WPF theme, then injects it into WPF so that it loads the newly-created theme; but this is a lot of work--much more than I'm willing to put into it, unfortunately. Looks like I'll have to deal with crappy-looking scrollbars. :( –  Sasha Chedygov Aug 5 '10 at 4:44
    
I think as long as you are not using WinXP, Vista Basic or 7 Basic your bars and buttons, if not styled, will look rather ok –  Dwayne Samuels Aug 5 '10 at 5:23
    
Yeah but imagine someone using a dark-colored theme. Silver scrollbars and buttons would look really out of place. :/ –  Sasha Chedygov Dec 16 '10 at 23:42

There IS a good workaround for this problem. The following procedure will tell WPF to use the windows vista/7 theme instead of windows basic (for the controls).

The reason that using a new theme causes these problems is that wpf figures out what theme is set by checking the file name of the currently activated visual style. If the name is "aero.msstyles", it uses the aero theme. If it is "luna.msstyles", it goes one step further and checks the current color scheme to fine tune the colors (NormalColor, Metallic, Homestead are the color schemes for windows xp, Windows vista ditches the color scheme concept entirely in favor of windows aero). There is also a built-in theme in wpf for "royale.msstyles". If the theme file has a name that wpf doesn't recognize, it just uses the windows basic theme instead.

The workaround? Rename your visual style from "{whatever}.msstyles" to "aero.msstyles", then modify its associated ".theme" files in notepad to account for the new name (note that now you can only apply the visual style with a theme file). WPF now shows the windows vista style instead of windows basic ;-).

share|improve this answer
    
This is a good workaround, definitely, but it doesn't solve the core issue. Say I used a dark theme--the default Aero controls would look really out of place. But either way, great find! Thanks! –  Sasha Chedygov Apr 23 '12 at 1:19

I also asked this question some time ago and couldn't find any answers.

http://stackoverflow.com/questions/7495906/visual-studio-2010-classic-system-theme

enter image description here

The only theme that Visual Studio 2010 supports is the default aero theme. Al tough I noticed that some themes do support it, but most don't.

I tried all things, basically, Running VS2010 as Administrator, running it in compatibility mode, installing/uninstalling SP1 etc.

We must abide by Microsoft's rules :P

share|improve this answer
1  
It makes sense that Visual Studio would not aupport custom themes, in theory that is up to the programmer to support and provide, Window's XP introduce a really weird problem for programmers "having to support" a custom theme and not having a great deal number of tools to do so. –  Ramhound Jan 31 '12 at 18:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.