public void StartDrag(CrownDockContent content) { _regionDropAreas = new Dictionary <CrownDockRegion, DockDropArea>(); _groupDropAreas = new Dictionary <CrownDockGroup, DockDropCollection>(); // Add all regions and groups to the drop collections foreach (CrownDockRegion region in _dockPanel.Regions.Values) { if (region.DockArea == DockArea.Document) { continue; } // If the region is visible then build drop areas for the groups. if (region.Visible) { foreach (CrownDockGroup group in region.Groups) { DockDropCollection collection = new DockDropCollection(_dockPanel, group); _groupDropAreas.Add(group, collection); } } // If the region is NOT visible then build the drop area for the region itself. else { DockDropArea area = new DockDropArea(_dockPanel, region); _regionDropAreas.Add(region, area); } } _dragContent = content; _isDragging = true; }
private void StopDrag() { Cursor.Current = Cursors.Default; _highlightForm.Hide(); _dragContent = null; _isDragging = false; }