Пример #1
0
 public override void OnDragEnter(DragEventArgs e)
 {
     base.OnDragEnter(e);
     this.LastHitTestResult = this.HitTestResult;
     if (this.DropTarget != null)
     {
         this.HitTestResult = ListItemDragDropHandler.HitTest(this.DropTarget, e.GetPosition((IInputElement)this.DropTarget));
     }
     else
     {
         this.HitTestResult = DropHitTestResults.None;
     }
 }
Пример #2
0
 public override void OnDragOver(DragEventArgs e)
 {
     base.OnDragOver(e);
     this.LastHitTestResult = this.HitTestResult;
     if (this.DropTarget != null)
     {
         this.HitTestResult = ListItemDragDropHandler.HitTest(this.DropTarget, e.GetPosition((IInputElement)this.DropTarget));
         if (this.hoverHelper == null)
         {
             return;
         }
         this.hoverHelper.HandleMouseMove(Mouse.GetPosition((IInputElement)this.DropTarget), (this.HitTestResult & DropHitTestResults.CenterHalf) != DropHitTestResults.None);
     }
     else
     {
         this.HitTestResult = DropHitTestResults.None;
     }
 }