title: Change WPF application manifest?
body: <p>I posted <a href="http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=420920" rel="nofollow noreferrer">a comment to Microsoft</a> that the Dialog Boxes in WPF are not VisualStyle enabled.</p>
  <p>Joe Castro posted a workaround there which I don't really understand how to achieve, can anyone help?</p>
  <p><strong>Here is he's response:</strong></p>
  <p>For app compat reasons applications don't by default use v6 of the system common controls (available since XP). This doesn't really apply to WPF, but you also only see it in a few situations when using the native controls so it's not as prevalent as WinForms where their APIs are just wrapping the standard controls.</p>
  <p>To fix this in WPF you need to explicitly opt-in to v6 comctl32 by specifying it in a manifest in your exe. This has to be done on the exe, so WPF can't do it as part of their DLLs. EnableVisualStyles does this at runtime but this way is generally better.</p>
  <p>E.g., something like:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
  &lt;assembly xmlns=&quot;urn:schemas-microsoft-com:asm.v1&quot; manifestVersion=&quot;1.0&quot;&gt;
      &lt;description&gt;MyExe.exe&lt;/description&gt;
      &lt;dependency&gt;
          &lt;dependentAssembly&gt;
              &lt;assemblyIdentity
                  type=&quot;win32&quot;
                  name=&quot;Microsoft.Windows.Common-Controls&quot;
                  version=&quot;6.0.0.0&quot;
                  processorArchitecture=&quot;*&quot;
                  publicKeyToken=&quot;6595b64144ccf1df&quot;
                  language=&quot;*&quot;/&gt;
          &lt;/dependentAssembly&gt;
      &lt;/dependency&gt;
  &lt;/assembly&gt;
  </code></pre>