BeepDockingManagerDesigner
The non-visual component designer for BeepDockingManager — lives in the component tray, provides 15 designer verbs and smart-tag for panel management at design time
Table of Contents
Overview
Namespace: TheTechIdea.Beep.Winform.Controls.Design.Server.Docking.Designers
Inheritance: ComponentDesigner (NOT a ControlDesigner — this is a tray component)
Visibility: internal sealed
BeepDockingManagerDesigner is the design-time experience for BeepDockingManager. Since the manager is a non-visual component, it appears in the component tray below the form designer rather than on the form surface. This follows the same pattern as Krypton's KryptonDockingManager.
It provides 15 designer verbs for adding, moving, stacking, and validating dock panels entirely from the Visual Studio designer.
Key Features
- Tray component — Sits in the component tray, not on the form surface
- 15 designer verbs — Context menu commands for panel management
- Smart-tag — BeepDockingManagerActionList for property configuration
- Auto host-form detection — On InitializeNewComponent, finds parent Form and assigns HostForm
- Panel validation — ValidatePanels() checks all associated panels for missing Keys
- IComponentChangeService integration — All mutations route through wiring for proper serialization
- Krypton parity — Follows KryptonDockingManager design-time pattern
Designer Verbs (15)
| Category | Verb | Description |
|---|---|---|
| Add Panel | Add Panel Left | Creates a new DockPanel docked to the left edge |
| Add Panel Right | Creates a new DockPanel docked to the right edge | |
| Add Panel Top | Creates a new DockPanel docked to the top edge | |
| Add Panel Bottom | Creates a new DockPanel docked to the bottom edge | |
| Add Panel Fill | Creates a new DockPanel filling remaining space | |
| Move Panel | Move Selected Panel Left | Moves currently selected panel to left edge |
| Move Selected Panel Right | Moves currently selected panel to right edge | |
| Move Selected Panel Top | Moves currently selected panel to top edge | |
| Move Selected Panel Bottom | Moves currently selected panel to bottom edge | |
| Move Selected Panel Fill | Moves currently selected panel to fill | |
| Stack | Stack Selected with Previous Panel | Groups selected panel into tab stack with previous |
| Stack Selected with Next Panel | Groups selected panel into tab stack with next | |
| Management | &Validate Panels | Checks all panels for missing/duplicate Keys |
| Attach &Host Form | Auto-detects and assigns Manager.HostForm |
Smart-Tag
The BeepDockingManagerActionList exposes these properties in the smart-tag panel:
| Property | Type | Description |
|---|---|---|
| HostForm | Form | The hosting form. Setting this calls ManageControl(). |
| Theme | string | Theme name for docking chrome. |
| UseThemeColors | bool | When true, reads from Beep theme. |
| Style | BeepControlStyle | Control style for docking surfaces. |
| PanelCount | int (read-only) | Number of currently managed panels. |
Design-Time Behavior
InitializeNewComponent
When first dropped on a form, the designer detects the parent form via the designer host and assigns it as Manager.HostForm. This mimics the Krypton behavior where the manager automatically binds to its hosting form.
Panel Operations
All panel Add/Move/Stack/Remove operations delegate to BeepDockingDesignerWiring which handles:
- Creating new
DockPanelcomponents viaIDesignerHost.CreateComponent() - Setting panel properties (Key, Title, DockPosition)
- Notifying
IComponentChangeServicefor serialization - Refreshing the host layout
Wiring Architecture
BeepDockingManagerDesigner (ComponentDesigner)
│
├── AddPanel(position) ──┐
├── RemovePanel(panel) ──┤
├── MoveSelectedPanel() ──┤
├── StackSelectedWith() ──┤
└── ValidatePanels() ──┤
│
┌─────────▼────────────┐
│ BeepDockingDesignerWiring │
│ (static helper class) │
│ │
│ CreateComponent(DockPanel) │
│ IComponentChangeService │
│ Designer.cs code-gen │
└────────────────────────────┘Examples
Using the Docking Manager at Design Time
// 1. Drop BeepDockingManager from toolbox onto form
// → Appears in component tray
// → Auto-detects form as HostForm
// 2. Right-click → "Add Panel Left"
// → Creates DockPanel with unique Key
// → Appears docked to left edge
// 3. Right-click panel → "Dock Right"
// → Panel repositions to right edge
// 4. Right-click manager → "Validate Panels"
// → Checks all panels for valid configuration