title: Set custom window position on wpf
body: <p>I think there is a bug with the Window.Width and Window.Height of wpf. I need my window to cover my entire desktop (there are two monitors) but first let me show you why I think there is a bug.</p>
  
  <h2>First let me show you the resolution of my monitors: (both have the same resolution)</h2>
  
  <p><img src="https://i.stack.imgur.com/1dNvt.png" alt="enter image description here"></p>
  
  <h2>this is the window on visual studio that I am working with</h2>
  
  <p><img src="https://i.stack.imgur.com/mYXyc.png" alt="enter image description here"></p>
  
  <p>I don't know if you guys know AutoIt but it is a nice program to automate simple stuff. so if I want to resize my MainWindow to cover all the space in my first monitor (same thing as if I where maximizing a window) I will execute this method on autoit:
  <img src="https://i.stack.imgur.com/NJ7Yg.png" alt="enter image description here"></p>
  
  <p>and when I execute that code my window that I am creating in visual studio extends and it appears exactly as if it where to be maximized. </p>
  
  <p><img src="https://i.stack.imgur.com/xLuJU.png" alt="enter image description here"></p>
  
  <p>so far the coordinates seem to be working. </p>
  
  <p>now when I do the same thing with c# on wpf:</p>
  
  <hr>
  
  <pre><code>    public static void setWindowSize(System.Windows.Window w)
      {
          w.Left = 0;
          w.Top =0;
          w.Width = 1920;
          w.Height = 1079;
      }
  </code></pre>
  
  <p>The parameter w will be the MainWindow. When I execute that take a look how the window get's resized:
  <img src="https://i.stack.imgur.com/YDalw.png" alt="enter image description here"></p>
  
  <p>I placed the older image next to it so that you guys can compare it. Why are the dimensions not the same? I belive that the Window.Width and Window.Height properties do not work correctly. or what am I doing wrong?</p>