title: Wrong coordinates on multiple monitors
body: <p>I have a Datagrid and I want to know the position of a datacell for overlaying it with a window.<br>
  It works fine with only one monitor, but with multiple monitors, the window is displaced.<br>
  Here's the code:</p>
  
  <pre><code>Point point = cell.PointToScreen(new Point(0, 0));
  ...
  Window myWindow = new Window();
  myWindow.Top = point.Y;
  myWindow.Left = point.X;
  </code></pre>
  
  <p>Somebody has some experience with positioning on multiple monitors?</p>
  
  <p>EDIT:<br>
  I made following test:</p>
  
  <pre><code>public MyWindow()
  {
      ...
      this.LocationChanged += MyWindow_LocationChanged;
  }
  
  void MyWindow_LocationChanged(object sender, EventArgs e)
  {
      Console.WriteLine(this.Top + " &lt;--&gt; " + this.PointToScreen(new Point(0, 0)).Y);
  }
  </code></pre>
  
  <p>Results:<br>
  - Single-Monitor: 0 &lt;--> 30; 20 &lt;--> 50; 100  &lt;--> 130<br>
     ==> Always difference of 30 (may be caused by title bar)<br>
  - Dual-Monitor: 0  &lt;--> 30;  20 &lt;--> 55; 100 &lt;--> 153<br>
  ==> At 0,0 difference of 30. But the more I moved the window away from 0,0. the greater becomes the difference, but should stay the same. Very strange!</p>
  
  <p>EDIT2:<br>
  Here's my solution, thanks to <a href="https://stackoverflow.com/questions/6030438/wrong-coordinates-on-multiple-monitors/6035953#6035953">CodeNaked</a> for the hint:  </p>
  
  <pre><code>Point point = cell.PointToScreen(new Point(0, 0));
  ...
  Window myWindow = new Window();
  PresentationSource source = PresentationSource.FromVisual(this);
  myWindow.Top = point.Y / source.CompositionTarget.TransformToDevice.M22;
  myWindow.Left = point.X / source.CompositionTarget.TransformToDevice.M11;
  </code></pre>