Overview

Namespace: TheTechIdea.Beep.Winform.Controls.Design.Server.Dialogs
Inheritance: System.Windows.Forms.Form | Visibility: public sealed | Full file: 974 lines

Opens when a BeepDocumentManager or BeepDocumentHost is first dropped onto a form. Also invocable manually via the smart-tag "Setup Wizard..." action. Lets developers choose a document presentation mode (TabbedDocuments, BrowserTabs), optionally add sample documents, apply layout templates, and pick which host to wire when multiple exist. Features a live preview panel, accessibility support with UIA live regions, and a "Do not show again" registry preference.

DocumentSetupResult

PropertyTypeDefaultDescription
ModeDocumentSetupModeTabbedDocumentsTabbedDocuments, BrowserTabs, or NativeMdi
AddSampleDocumentsboolfalseSeed sample document tabs after setup
SampleDocumentCountint3Number of sample docs to create (disabled if existing docs > 0)
ApplyTemplateboolfalseApply a layout preset template
TemplateIdstring"Empty"Template identifier to apply
ConfigureLaterboolfalseUser chose to skip setup (wizard closed without configuring)
SelectedHostComponentobject?nullChosen BeepDocumentHost (null = auto-resolve). Shown when multiple hosts exist.
DoNotShowAgainboolfalseSuppress automatic wizard on future component drops (stored in registry)

Wizard Dialog

Constructors: DocumentSetupWizardDialog(DocumentSetupMode) (simple), DocumentSetupWizardDialog(DocumentSetupMode, int existingDocCount, IReadOnlyList<HostPickerOption>? hostOptions) (full). The full constructor disables "add sample" when existing docs exist and shows a host picker combo when multiple hosts are present.

ModeTile Control

Private nested Control subclass. Custom-rendered selectable tile with icon painting (via IconPainter), title, description, "Recommended" badge, hover/selected/focus states, keyboard support (Enter/Space to select), and accessibilty integration (RaiseSelectionAccessibilityEvent for UIA). Exposes: Mode, TileTitle, Description, IsRecommended, IsSelected, Selected event.

PreviewPanel

Private nested Panel subclass. Custom-painted preview area rendering a visual mockup of the selected DocumentSetupMode: TabbedDocuments shows a tab strip with document tabs, BrowserTabs shows Chrome-style tabs, NativeMdi shows a windowed preview. Uses WizardPalette colors for theme consistency.

WizardPalette Integration

Uses WizardPalette to derive colors from the active Beep theme or SystemColors (high contrast fallback). The palette provides 30+ color slots for form background, surface, tiles, preview pane, text foregrounds, accent, and warning colors. Drives the visual consistency of the wizard with the runtime theme.

Examples

// Auto-opens when BeepDocumentManager dropped on form.
// Can be re-opened from smart-tag > "Setup Wizard..."

// Preview shows live mockup of each mode:
//   TabbedDocuments: shows tab strip + document area
//   BrowserTabs: shows Chrome-style tabs + add button

// Result applied via designer transaction:
managerDesigner.ApplySetupResult(result);
// -> Creates/wires BeepDocumentHost with chosen style