title: c# uwp pointer position
body: <p>In UWP I am trying to get position of pointer.</p>
  
  <p>I have managed to do it with next Event:</p>
  
  <pre><code>    private void Grid_PointerMoved(object sender, PointerRoutedEventArgs e)
      {
          PointerPoint point = e.GetCurrentPoint(mainGrid);
          var x = point.Position.X;
          var y = point.Position.Y;
      }
  </code></pre>
  
  <p>And with this way it will be fired all the time. So, I needed some property to get that position. I have found this:</p>
  
  <pre><code>var pointerPosition = Windows.UI.Core.CoreWindow.GetForCurrentThread().PointerPosition;
  </code></pre>
  
  <p>But it doesn't always return correct position.</p>
  
  <p>Any other property to get current mouse location?</p>