title: Set WPF/XAML window client area size
body: <p>I have a pixel perfect control layout for a form I want to create. I know the exact width, height and location of each control.</p>
  
  <p>But I am finding it difficult to set it perfectly inside a Window element.</p>
  
  <p>The Width and Height property of the Window is including the borders. How can I set the inner width and height of the window? The Client width and height.</p>
  
  <p>Say, my form is 300px wide. If I set the width and height of the Window to 300, then the borders take up anywhere from 5 - 15px and only 285 or so pixels are available for the client area where you can add controls. I want to set <em>this</em> client area's width to 300px.</p>
  
  <p>I tried having a container control like a Grid or StackPanel and set its width to 300px and setting the window's widthto auto. But the window was way too wide.</p>
  
  <p>Hope I am making sense.</p>
  
  <p>How can I do it?</p>