title: How do I compute the non-client window size in WPF?
body: <p>WPF has the <a href="http://msdn.microsoft.com/en-us/library/system.windows.systemparameters.aspx" rel="noreferrer"><code>SystemParameters</code> class</a> that exposes a great number of system metrics. On my computer I have noticed that a normal window has a title that is 30 pixels high and a border that is 8 pixels wide. This is on Windows 7 with the Aero theme enabled:</p>
  
  <p><img src="https://i.stack.imgur.com/cBEZj.png" alt="Non-client area - Aero"></p>
  
  <p>However, <code>SystemParameters</code> return the following values:</p>
  
  <pre><code>SystemParameters.BorderWidth = 5
  SystemParameters.CaptionHeight = 21
  </code></pre>
  
  <p>Here I have disabled the Aero theme:</p>
  
  <p><img src="https://i.stack.imgur.com/KZXkC.png" alt="Non-client area - classic"></p>
  
  <p>Now, <code>SystemParameters</code> return the following values:</p>
  
  <pre><code>SystemParameters.BorderWidth = 1
  SystemParameters.CaptionHeight = 18
  </code></pre>
  
  <p>How do I compute the actual observed values by using <code>SystemParameters</code>?</p>