3

I carefully followed the instructions for how to change the style for the standard dialogs in WPF app, so I've created an app.manifest, uncommented this section from the created template

<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<dependency>
   <dependentAssembly>
  <assemblyIdentity
      type="win32"
      name="Microsoft.Windows.Common-Controls"
      version="6.0.0.0"
      processorArchitecture="*"
      publicKeyToken="6595b64144ccf1df"
      language="*"
    />
</dependentAssembly>

Checked the project properties: Icon and Manifest-> Manifest selected app.manifest in combo. Rebuild the project...

Still getting the bad style like this:

bad style

Any ideas?

Using 64bit Win 7, VS 2010 SP1, app is built for x86

Thx for answers

* Edit * Anton Tykhyy answered the question as comment. Thx Anton

Anton's comment quoted: "Are you running the project from inside VS? Try running the executable directly (Start->Run or Explorer). – Anton Tykhyy"

g.pickardou
  • 32,346
  • 36
  • 123
  • 268

2 Answers2

3

When you run the project from inside VS, the executable that VS actually runs is not your build output .exe, but a special interstitial executable with the extension .vshost.exe. This interstitial executable is responsible for communication between the VS debugger and the new process, but it does not have the icon or the manifest which you specify. That's why you get different behavior.

Incidentally, there is a checkbox in the project settings under the Debug tab called 'Enable the Visual Studio hosting process'. If you uncheck it, VS will run your output .exe directly.

Anton Tykhyy
  • 19,370
  • 5
  • 54
  • 56
0

All the attibutes you specified in the assemblyIdentity tag are coorect and give tu results you obtain. The style is "bad" because you specified an "old" style. (on purpose ?).

Your problem is neither the OS version nor VS, but the assembly you target

Stephane Halimi

Stephane Halimi
  • 408
  • 3
  • 5
  • I did not specified the old style... instead I specified the themed style, see the MS original comment in the first line... – g.pickardou Jan 25 '13 at 13:31