DocumentHostActionList
The richest smart-tag in the Beep library — 40+ properties and 20+ action methods across 18 organized sections for comprehensive design-time document management
Table of Contents
Overview
Namespace: TheTechIdea.Beep.Winform.Controls.Design.Server.ActionLists
Inheritance: DesignerActionList
DocumentHostActionList is the most comprehensive smart-tag in the Beep controls library. It provides the entire design-time surface for BeepDocumentHost, the MDI tabbed document container. With 40+ properties and 20+ action methods across 18 organized sections, it rivals the design-time experience of commercial controls like DevExpress DocumentManager.
Key Features
- 18 organized smart-tag sections — Status, Documents, Split View, Nested Splits, Tabs, Tab Sizing, Interaction, Style Presets, Appearance, Preview, History, Cross-Host Drag, Policies, Animation, Quick Actions, Session
- 8 document CRUD actions — Add, Close Active, Close All, Reopen Last Closed, Float, Pin/Unpin, Split
- 6 style preset shortcuts — Chrome, VSCode, Flat, Office, Pill, Underline
- LayoutTreeInfo — Read-only formatted layout tree text for debugging
- GroupTabPositions — Parsable string format for per-group tab position configuration
- Setup Wizard — Quick setup wizard registered as a designer verb
Smart-Tag Sections (18)
| Section | Properties | Description |
|---|---|---|
| Status | Status (read-only) + SetupWizard verb | Host state + quick setup launcher |
| Documents | ActiveDocumentTitle + 8 action methods | Document CRUD operations |
| Split View | MaxGroups, SplitHorizontal, SplitRatio + 4 actions | Split window management |
| Nested Splits | GroupTabPositions, LayoutTreeInfo | Per-group configuration |
| Tabs | TabStyle, TabPosition, CloseMode, ShowAddButton, TabColorMode, KeyboardShortcutsEnabled | Tab appearance and behavior |
| Tab Sizing | TabSizeMode, FixedTabWidth | Tab width behavior |
| Interaction | TabTooltipMode, AllowDragFloat | User interaction settings |
| Style Presets | 6 preset methods | Quick style application |
| Appearance | ControlStyle, ThemeName + ChooseTheme() | Visual configuration |
| Preview | TabPreviewEnabled | Tab hover preview |
| History | MaxRecentHistory, MaxClosedHistory | Session history limits |
| Cross-Host Drag | AllowDragBetweenHosts | Multi-host drag support |
| Policies | AllowFloat, AllowSplit, AllowPin, AllowAutoHide, MaxSplitDepth | Feature gate flags |
| Animation | AutoHideHoverDelay | Auto-hide timing |
| Session | AutoSaveLayout, SessionFile, EnableRoutedCommands, EnableTransactionalDocking, EnableHostTelemetry | Persistence and telemetry |
Document Actions
| Method | Description |
|---|---|
| AddNewDocument() | Adds a placeholder document at design time |
| CloseActiveDocument() | Closes the currently active document tab |
| CloseAllDocuments() | Closes all open documents |
| ReopenLastClosed() | Reopens the most recently closed document |
| FloatActiveDocument() | Detaches active document to its own floating window |
| PinActiveDocument() / UnpinActiveDocument() | Toggles pinned state |
| SplitActiveHorizontal() / SplitActiveVertical() | Creates new split document groups |
| MergeAllGroups() | Collapses all split groups into a single tab group |
| SaveLayoutSnapshot() | Copies layout JSON to clipboard |
| ClearAllDocuments() | Removes all documents, resets host |
| SetupWizard() | Opens quick DocumentHost setup wizard (designer verb) |
| ChooseTheme() | Opens ThemePickerDialog |
| OpenLayoutAssistant() | Opens guided layout assistant dialog |
| EditDesignTimeDocuments() | Opens document editor for design-time docs |
| ApplyLayoutPreset() | Opens layout preset picker dialog |
Style Presets
// Six one-click style presets:
public void UseChromStyle() // Google Chrome style tabs
public void UseVSCodeStyle() // Visual Studio Code style
public void UseFlatStyle() // Clean flat design
public void UseOfficeStyle() // Microsoft Office style
public void UsePillStyle() // Rounded pill tabs
public void UseUnderlineStyle() // Underline indicatorSetup Wizard
The DocumentSetupWizardDialog is registered as a designer verb (star icon in the smart-tag). It provides a step-by-step wizard for configuring a new DocumentHost:
- Select tab style (Chrome, VSCode, Flat, Office, Pill, Underline)
- Choose tab position (Top, Bottom, Left, Right)
- Configure initial documents
- Set split view preferences
- Configure keyboard shortcuts and interaction policies
Examples
// At design time, configure via smart-tag.
// At runtime, equivalent API:
var host = new BeepDocumentHost();
// Tab configuration
host.TabStyle = TabStyle.Chrome;
host.TabPosition = TabPosition.Top;
host.CloseMode = CloseMode.All;
host.ShowAddButton = true;
// Document management
host.AddDocument("Main.cs", new RichTextBox());
host.AddDocument("App.config", new TextBox());
host.CloseAllDocuments();
// Split views
host.SplitActiveHorizontal();
host.MaxGroups = 4;
// Layout persistence
host.AutoSaveLayout = true;
host.SessionFile = "layout.json";
var json = host.SaveLayout();
host.LoadLayout(json);