title: Reorder items in ListView using drag and drop
body: <p>I tried to reorder items in a ListView using drag and drop gestures.</p>
  
  <p><code>In the "Drop" method I don't know how to get a reference to the "dropped" element, I only get reference to the "target drop" element.</code></p>
  
  <p>See below:</p>
  
  <pre><code>private void Grid_Drop(object sender, DragEventArgs e)
          {
              ReorderItem draggedElement = (e.OriginalSource as Grid).DataContext as ReorderItem;
              ReorderItem targetElement = ((Grid)sender).DataContext as ReorderItem;
  
              Debug.WriteLine("Dragged element is:" + draggedElement.Index);
              Debug.WriteLine("Drag target element is:" + targetElement.Index);
          }
  </code></pre>
  
  <p>The reorder is between 0 and 1 indexes. The console index is both 1 :(</p>
  
  <pre><code>&lt;ListView ItemsSource="{Binding Items}" CanReorderItems="True"&gt;
                  &lt;ListView.ItemTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;Grid Background="{Binding Color}"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                AllowDrop="True"
                                Drop="Grid_Drop"&gt;
                          &lt;/Grid&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/ListView.ItemTemplate&gt;
  </code></pre>