/// <summary>
 ///
 /// </summary>
 /// <param name="de"></param>
 protected override void OnDragOver(DragEventArgs de)
 {
     if (this.ForwardOnDrag)
     {
         ProcessDragOver(de);
         MgPanelDesigner designer = GetDraggedOverPanelDesigner(de);
         designer.OnDragOverInternal(de);
     }
     else
     {
         base.OnDragOver(de);
     }
 }
        /// <summary>
        /// Get the designer of panel
        /// </summary>
        /// <param name="de"></param>
        /// <returns></returns>
        private MgPanelDesigner GetDraggedOverPanelDesigner(DragEventArgs de)
        {
            MgTabControl control = (MgTabControl)this.Control;
            MgPanel      panel   = control.SelectedTab.Controls[0] as MgPanel;

            Debug.Assert(panel != null);
            MgPanelDesigner designer = null;

            IDesignerHost service = (IDesignerHost)this.GetService(typeof(IDesignerHost));

            if (service != null)
            {
                designer = service.GetDesigner(panel) as MgPanelDesigner;
            }
            return(designer);
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="de"></param>
 protected override void OnDragDrop(DragEventArgs de)
 {
     if (this.ForwardOnDrag)
     {
         MgPanelDesigner selectedTabPageDesigner = GetDraggedOverPanelDesigner(de);
         if (selectedTabPageDesigner != null)
         {
             selectedTabPageDesigner.OnDragDropInternal(de);
         }
     }
     else
     {
         base.OnDragDrop(de);
     }
     this.ForwardOnDrag = false;
     ((MgTabControl)this.Control).IsDragging = false;
 }