/// <summary> /// Retrieve the desire node effect depending on the current mouse position /// </summary> /// <param name="dragNodes">Node being dragged</param> private DragDropEffects getDragDropEffect(IEnumerable <ITreeNode> dragNodes) { if (dragNodes == null) { return(DragDropEffects.None); } var p = _treeView.PointToClient(Control.MousePosition); var targetNode = _treeView.CalcHitInfo(p).Node; var treeNodes = dragNodes.ToList(); if (!treeNodes.All(_presenter.CanDrag)) { return(DragDropEffects.None); } if (treeNodes.All(node => _presenter.CanDrop(node, nodeFrom(targetNode)))) { return(DragDropEffects.Move); } return(DragDropEffects.None); }