title: Drag drop in WPF
body: <p>I have WPF application with drag-n- drop inmplementation... 
  Whenever I drag tree item on a <code>Grid</code> it is processed by <code>DragDrop</code> Event of that <code>Grid</code>, but every time it get <strong>fired twice</strong> what could be the reason?</p>
  
  <p>Below is code for implementing drag drop on a <code>TreeView</code>:</p>
  
  <pre><code> void treeViewGroups_MouseMove(object sender, MouseEventArgs e)
   {
     try
     {
       if (e.LeftButton == System.Windows.Input.MouseButtonState.Pressed)
       {
          Point position = e.GetPosition(null);
          if (Math.Abs(position.X - this.startPoint.X) &gt; SystemParameters.MinimumHorizontalDragDistance || Math.Abs(position.Y - this.startPoint.Y) &gt; SystemParameters.MinimumVerticalDragDistance)
          {
            DataRowView treeViewItem = this.treeViewGroups.SelectedItem as DataRowView;
            if (treeViewItem != null)
            if ((treeViewItem.Row.Table.TableName == "TableGroup"))
            {
               ViewTaxSCConstants.dragElement = treeViewItem;
               Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Render, new System.Threading.ParameterizedThreadStart(DoDragDrop), treeViewItem);                                
             }
          }
       }
  }
  </code></pre>