title: Why do WPF Applications look different between Windows 7 and Windows 8 and can this be fixed?
body: <p>I'm really surprised that this question does not appear to have been asked yet... if it has, but I just couldn't find it, apologies.</p>
  
  <p>Ok, so my work computer has just been upgraded from Windows 7 to Windows 8. To my absolute horror, my WPF Application looks different in several ways... by different, I mean worse, uglier, controls not lined up correctly, etc. Here is an example:</p>
  
  <p>Windows 7:</p>
  
  <p><img src="https://i.stack.imgur.com/8WRlo.png" alt="enter image description here"></p>
  
  <p>Windows 8:</p>
  
  <p><img src="https://i.stack.imgur.com/0r99p.png" alt="enter image description here"></p>
  
  <p>Windows 8 problems (just from this image):</p>
  
  <ul>
  <li>Wrong title bar including buttons (Minimise, Close, etc.)</li>
  <li>Wrong size Font in title bar</li>
  <li>Wrong FontWeight in headings (Windows 7 SemiBold setting = Windows 8 Bold setting)</li>
  <li>Icon (or text) misaligned in title bar</li>
  <li>Icon in title bar is <em>very</em> blurry</li>
  <li>Wrong Padding and/or Margin settings spacing out items on left</li>
  <li>Wrong Padding and/or Margin settings reducing Textbox Heights on right</li>
  <li>'Hidden' default selection colour on items on left no longer hidden</li>
  <li>Back to front Checkbox tick</li>
  <li>Images on some Buttons are very blurry </li>
  </ul>
  
  <p>So, my question is this:</p>
  
  <p><strong>Why do WPF Applications look different between Windows 7 and Windows 8 and can this be fixed?</strong>  </p>
  
  <p>To clarify this, I'm <em>not</em> after a list of differences between WPF on the two operating systems. I'm also <em>not</em> after fixes for the individual points listed above. I would like for someone to explain <em>why</em> these UIs look different, eg. what is causing these differences.  I have also heard talk of some system settings in WPF that would enable me to make the PC render the application <em>as if it were on Windows 7</em>, but I don't know how truthful that was.</p>
  
  <hr>
  
  <p>UPDATE >>></p>
  
  <p>As @AndrasSebö kindly pointed out, there is a StackOverflow question named <a href="https://stackoverflow.com/questions/2075720/windows-7-theme-for-wpf">Windows 7 theme for WPF?</a>, which fixes a similar problem for Windows XP. Unfortunately, it doesn't seem to have any effect on Windows 8. Are there any Microsoft users out there that <em>actually</em> know what differences were implemented to cause this problem? Or anyone?</p>
  
  <hr>
  
  <p>UPDATE 2 >>></p>
  
  <p>Ok, so after some more testing, I'm beginning to think that this problem is <em>not</em> related to the Windows Theme. Using the code provided in @Gusdor's answer, I tried changing the theme to <code>Aero</code> and there was no visible difference... that got me thinking. I then changed it to <code>Luna</code> to test that code and it worked.</p>
  
  <p>By 'worked', I mean that the Windows Theme changed, but the UI controls, or more accurately, the incorrect <code>Padding</code> and <code>Margin</code> remained. I then tried changing the Theme to <code>Luna</code> using the XAML method mentioned by @AndrasSebö and the same thing happened... the <code>ScrollBar</code>s looked different, so I could see that the Theme had changed, but the problem remained.</p>
  
  <p>So now I'm thinking that this might have something to do with the fact that this is a brand new computer that I'm working on... might there be some dll or setting that I need to install? I'm really just guessing here - I have the whole Microsoft .NET Framework installed to version 4.5.1 as I'm on Windows 8.1. </p>
  
  <p>This is an absolute nightmare as I don't have time to go and fix every view in this large application. Please help if you can.</p>