示例#1
0
 internal static IEnumerable <DropTargetInfo> GetDropTargetAtPoint(
     UIElement draggedElement,
     UIElement container,
     MouseEventArgs e)
 {
     return(DragDropHelper.GetDropTargetAtPoint(draggedElement, container, e.GetPosition));
 }
示例#2
0
        protected virtual IDropTarget GetDropTargetOnDrag(MouseEventArgs e, out Nullable <Point> dropTargetPosition, out IDropTarget lastFoundDropTarget)
        {
            IDropTarget dropTarget = DragDropHelper.GetDropTargetAtPoint(this.DraggedElement, this.DragContainer, e, out dropTargetPosition, out lastFoundDropTarget);

            // ColumnManagerRow was defined as IDropTarget only because Animated Column Reordering required it, ignore it in base class
            if (dropTarget is ColumnManagerRow)
            {
                dropTarget         = null;
                dropTargetPosition = null;
            }

            return(dropTarget);
        }
        protected virtual DropTargetInfo GetDropTarget(Func <IInputElement, Point> getPosition)
        {
            foreach (var info in DragDropHelper.GetDropTargetAtPoint(this.DraggedElement, this.Container, getPosition))
            {
                if (!info.CanDrop)
                {
                    continue;
                }

                // ColumnManagerRow was defined as IDropTarget only because Animated Column Reordering required it, ignore it in base class
                if (info.Target is ColumnManagerRow)
                {
                    break;
                }

                return(info);
            }

            return(new DropTargetInfo(null, null, false));
        }