コード例 #1
0
 public void Drop(IDragSource dragSource, UIElement draggedElement)
 {
     dragSource.CompleteDrag();
     Actions.InsertColumn(panel, column);
     Actions.AddNewCell(panel, column, row, draggedElement);
     dragSource.AfterDropComplete();
     Actions.InvalidateLayout(panel);
 }
コード例 #2
0
ファイル: ContentPanel.cs プロジェクト: radtek/LayoutDesigner
        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();
        }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: RecycleBin.cs プロジェクト: radtek/LayoutDesigner
 public new void Drop(IDragSource dragSource, UIElement draggedElement)
 {
     dragSource.CompleteDrag();
     dragSource.AfterDropComplete();
 }