private void BeginDrag(MouseEventArgs e)
        {
            this.initialMousePosition = new Point(e.X, e.Y);
            RadElement elementAtPoint = sourceComponentElementTree.GetElementAtPoint(this.initialMousePosition);

            if (elementAtPoint == null)
            {
                return;
            }
            else
            {
                if ((elementAtPoint.Visibility != ElementVisibility.Visible))
                {
                    return;
                }
            }

            if (elementAtPoint is RadListElement)
            {
                return;
            }
            if (elementAtPoint is RadListVisualItem)
            {
                sourceListBox.SelectedItem = (elementAtPoint as RadListVisualItem).Data;
            }

            this.draggedItem = (elementAtPoint as RadListVisualItem).Data;

            DragCancelEventArgs args = new DragCancelEventArgs(this.draggedItem, null);

            if (args.Cancel)
            {
                this.draggedItem = null;
                return;
            }

            RadDragEventArgs dragArgs = new RadDragEventArgs(this.draggedItem, null);

            this.isRealDrag = false;

            this.dragging = true;

            if (this.feedBackForm == null)
            {
                feedBackForm = new FeedBackForm();
            }

            this.colorToSet             = this.FeedbackFormLineColor();
            this.feedBackForm.LineColor = this.colorToSet;

            if (this.draggedItem != null)
            {
                PrepareDragging(e);
            }
        }
        private void EndDrag(MouseEventArgs e)
        {
            this.dragging = false;

            if (this.draggedItem != null)
            {
                if (targetListBox != null)
                {
                    if (targetListBox == sourceListBox && sourceListBox.Items.Count == 1)
                    {
                        return;
                    }

                    Point p2 = new Point();
                    p2 = sourceListBox.PointToScreen(new Point(e.X, e.Y));
                    p2 = targetListBox.PointToClient(p2);
                    RadElement elementAtPoint = targetComponentElementTree.GetElementAtPoint(p2);

                    if (elementAtPoint != null)
                    {
                        if ((elementAtPoint.Visibility != ElementVisibility.Visible))
                        {
                            return;
                        }

                        //RadListVisualItem visualItem = elementAtPoint as RadListVisualItem;
                        //if (visualItem != null)
                        {
                            //replacedItem = visualItem.Data;
                            if (draggedItem == replacedItem)
                            {
                                return;
                            }
                            RefreshItemsAfterDragDrop(e);
                        }
                    }

                    if (this.outlineForm != null)
                    {
                        this.outlineForm.Dispose();
                        this.outlineForm = null;
                    }

                    if (this.feedBackForm != null)
                    {
                        this.feedBackForm.Dispose();
                        this.feedBackForm = null;
                    }

                    this.isRealDrag = false;
                }
            }
        }
        private void InitializeDragOperation(object sender, MouseEventArgs e)
        {
            sourceListBox = (RadListControl)sender;

            sourceComponentElementTree = sourceListBox.ElementTree;

            if (sourceComponentElementTree.RootElement.ElementTree != null && this.AllowDragDrop)
            {
                RadElement elementAtPoint = sourceComponentElementTree.GetElementAtPoint(e.Location);

                if (elementAtPoint is RadListVisualItem)
                {
                    if (e.Button == MouseButtons.Left)
                    {
                        sourceComponentElementTree.RootElement.ElementTree.Control.Capture = true;

                        BeginDrag(e);
                    }
                }
            }
        }
        private void DrawFeedBack(MouseEventArgs e)
        {
            if (targetListBox == null)
            {
                feedBackForm.Hide(); return;
            }
            this.targetComponentElementTree = this.targetListBox.ElementTree;
            Point p4 = new Point();

            p4 = sourceListBox.PointToScreen(new Point(e.X, e.Y));
            p4 = targetListBox.PointToClient(p4);
            RadElement elementAtPoint = targetComponentElementTree.GetElementAtPoint(p4);

            RadListVisualItem visualReplacedItem = elementAtPoint as RadListVisualItem;

            this.replacedItem = visualReplacedItem != null ? visualReplacedItem.Data : null;

            if (visualReplacedItem == null)
            {
                feedBackForm.Hide(); return;
            }

            if (visualReplacedItem != null)
            {
                int UpperBound  = visualReplacedItem.Bounds.Height * this.targetListBox.Items.IndexOf(this.replacedItem);
                int MiddleBound = UpperBound + visualReplacedItem.Bounds.Height / 2;
                int LowerBound  = UpperBound + visualReplacedItem.Bounds.Height;

                if (p4.Y < UpperBound || p4.Y > LowerBound)
                {
                    //FeedBack shouldnt be drawn
                    feedBackForm.StartPoint = null;
                }

                if (p4.Y <= MiddleBound && p4.Y > UpperBound)
                {
                    //FeedBack should be drawn above the replceditem
                    feedBackForm.StartPoint = this.targetListBox.PointToScreen(new Point(0 + 3, UpperBound + 1));
                }

                if (p4.Y <= LowerBound && p4.Y > MiddleBound)
                {
                    //FeedBack should be drawn below the replaceditem
                    feedBackForm.StartPoint = this.targetListBox.PointToScreen(new Point(0 + 3, UpperBound + 1 + visualReplacedItem.Bounds.Height));
                }
            }

            if (elementAtPoint is RadListElement)
            {
                if (targetListBox.Items.Count > 0)
                {
                    RadListDataItem lastItem = this.targetListBox.Items[this.targetListBox.Items.Count - 1];


                    //FeedBack should be drawn always below the last item of the targetListBox
                    if (feedBackForm == null)
                    {
                        return;
                    }
                    feedBackForm.StartPoint = this.targetListBox.PointToScreen(new Point(3, 1 + lastItem.VisualItem.Bounds.Height * this.targetListBox.Items.IndexOf(lastItem) + lastItem.VisualItem.Bounds.Height));
                }
                else
                {
                    feedBackForm.StartPoint = null;
                }
            }
            SetFeedBackForm();
        }