MessageBox in WPF app still displays with non-standard

I followed the instructions closely on how to change the style for standard dialogs in a WPF application, so I created an app.manifest, uncommented this section from the generated 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 project properties: Icon & Manifest -> Manify selected app.manifest into combo. Restore project ...

The style is still bad:

bad style

Any ideas?

Using 64-bit Win 7, VS 2010 SP1, application built for x86

thanks for the answers

* Edit * Anton Tikhiy answered the question as a comment. thanks Anton

Anton's comment: "Do you run the project from within VS? Try to run the executable file directly (" Start "-" Start "or" Explorer "). - Anton Tikhiy"

+3


source to share


2 answers


When you run a project from within VS, the executable that VS actually runs is not your build output .exe, but a special executable executable with a .vshost.exe extension. This cross-page executable is responsible for the communication between the VS debugger and the new process, but it doesn't have the icon or manifest you specified. This is why you get different behavior.



By the way, there is a checkbox in the project settings under the Debug tab called "Enable Visual Studio Hosting Process". If you uncheck it, VS will automatically launch your .exe output.

+3


source


All the attributes you specified in the assemblyIdentity tag are edited and give the tu results you get. The style is "bad" because you specified the "old" style. (on purpose?).

Your problem is not the OS version nor VS, but the setup you are targeting to



Stefan Halimi

0


source







All Articles