public void Drop(IDragSource dragSource, UIElement draggedElement)
 {
     dragSource.CompleteDrag();
     Actions.InsertColumn(panel, column);
     Actions.AddNewCell(panel, column, row, draggedElement);
     dragSource.AfterDropComplete();
     Actions.InvalidateLayout(panel);
 }
Example #2
0
        public new void Drop(IDragSource dragSource, UIElement draggedElement)
        {
            dragSource.CompleteDrag();
            DragDropGrid grid = this.Parent as DragDropGrid;

            if (grid != null)
            {
                int column = Grid.GetColumn(this);
                int row    = Grid.GetRow(this);
                Actions.AddNewCell(grid, column, row, draggedElement);
            }
            else
            {
                Actions.InsertChild(this, draggedElement);
            }
            dragSource.AfterDropComplete();
        }
        public void Drop(IDragSource dragSource, UIElement draggedElement)
        {
            // important to get the old index before dragSource.CompleteDrag() because
            // the index of the deleted control will be "not found" after it's deleted
            int oldIndex = GetOldIndex(dragSource, draggedElement);

            dragSource.CompleteDrag();

            int index = this.index;

            if (oldIndex > -1 && oldIndex < index)
            {
                index--;
            }
            if (classification == PointSituationRelativeToRect.After)
            {
                index++;
            }
            Actions.InsertChild(panel, draggedElement, index);

            dragSource.AfterDropComplete();

            Actions.InvalidateLayout(panel);
        }
Example #4
0
 public new void Drop(IDragSource dragSource, UIElement draggedElement)
 {
     dragSource.CompleteDrag();
     dragSource.AfterDropComplete();
 }