2

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?

Gareth
  • 19,080

4 Answers4

2

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 ;)

1

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 ;-).

AlexKven
  • 11
  • 1
0

plz excuse, I didn't have enough 'points' to comment or clarify from the context of AlexKven's answer

Just wanted to add, for those interested…

in the *.theme file, you must specify aero.msstyles in Titlecase. so it should read something like Path=%ResourceDir%\themes\path\to\Aero.msstyles as opposed to ...\aero.msstyles.

see also: github.com/riverar/uxstyle

tfw
  • 1
0

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

https://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

Kyle
  • 1