title: In a WPF Grid, how can I find the Row & Column at the mouse location?
body: <p>I have a WPF <code>Grid</code> with some rows and columns, e.g.</p>
  
  <pre><code>&lt;Grid Name="myGrid" MouseMove="OnMouseMove"&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition/&gt;
          &lt;RowDefinition/&gt;
          &lt;RowDefinition/&gt;
      &lt;/Grid.RowDefinitions&gt;
  
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition/&gt;
          &lt;ColumnDefinition/&gt;
          &lt;ColumnDefinition/&gt;
      &lt;/Grid.ColumnDefinitions&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>With a handler for <code>MouseMove</code> in the .cs file, e.g.</p>
  
  <pre><code>private void OnMouseMove(object sender, MouseEventArgs e)
  {
      var position = e.GetPosition(myGrid);
  
      // What row &amp; col is the mouse over?
  }
  </code></pre>
  
  <p>I want to be able to find which row and column in the grid the mouse is over, is this possible?</p>
  
  <p>[Note: this is a simplified version of the problem, so it looks a little odd to present it in this way - it's part of some drag &amp; drop between grids functionality]</p>