title: Getting a TreeViewItem from the Drop event in a TreeView when a different node is selected
body: <p>I have a drag and drop from a ListBox into a TreeView, the problem I have is that I can only see the "IsSelected" node that is returned from the TreeView sender under the Drop event, this is because I am selecting a property from the listbox of a TreeViewItem and dragging it into another TreeViewItem.</p>
  
  <p>I hope that makes sense.</p>
  
  <p>I can't get the data from the "dropped" TreeViewItem, I currently have these methods but I can't get the TreeViewItem I drop the ListBoxItem into.</p>
  
  <pre><code>private void nodeTree_Drop(object sender, DragEventArgs e)
  {
      if (e.Data.GetDataPresent("copyProperty"))
      {
          BasePropertyTypeVM dragged = e.Data.GetData("copyProperty") as BasePropertyTypeVM;
      }
  }
  
  private void NodeTree_OnDragEnter(object sender, DragEventArgs e)
  {
      if (!e.Data.GetDataPresent("copyProperty") ||
          sender == e.Source)
      {
          e.Effects = DragDropEffects.None;
      }
  }
  
  private void NodeTree_OnDragOver(object sender, DragEventArgs e)
  {
      TreeViewItem treeViewItem = FindAncestor&lt;TreeViewItem&gt;((DependencyObject) e.OriginalSource);
      if (treeViewItem != null)
      {
          treeViewItem.Background = Brushes.Blue;
      }
  }
  
  private void NodeTree_OnDragLeave(object sender, DragEventArgs e)
  {
      TreeViewItem treeViewItem = FindAncestor&lt;TreeViewItem&gt;((DependencyObject) e.OriginalSource);
      if (treeViewItem != null)
      {
          treeViewItem.Background = Brushes.White;
      }
  }
  </code></pre>