protected virtual void OnEndCaptionDrag(Point dropPoint, Rectangle endDragBounds) { using (RedrawStopper stopRedraws = new RedrawStopper(_manager, true)) { DockControlContainer container = GetDropContainer(dropPoint); if (container == null) { endDragBounds.X -= FloatingForm.PaddingSize; endDragBounds.Y -= FloatingForm.PaddingSize; endDragBounds.Width += 2 * FloatingForm.PaddingSize; endDragBounds.Height += 2 * FloatingForm.PaddingSize; FloatControl(endDragBounds); } else { int dimension = DockControlHelpers.GetDockedDimension(this, container.Dock); container = DockControlHelpers.CreateNewContainerIfNecessary(_manager, container, PointToScreen(dropPoint), DockingBarSize); DockControl(dropPoint, container, dimension); RemoveFloatingForm(); } } }
private void _controlList_ControlAdded(DockedControlCollection list, DockingControl control) { _inExternalAddControl = true; AddControl(control, -1, DockControlHelpers.GetDockedDimension(control, this.Dock)); _inExternalAddControl = false; }