Table of Contents

Class WizardControl

Namespace
SharpConsoleUI.Controls
Assembly
SharpConsoleUI.dll

A discoverable, wizard-shaped FlowControl: an embeddable control that runs a multi-step Wizard<TState>() inline inside an existing window's layout (banner + scrollable body + button toolbar), rather than opening a modal window per step.

public class WizardControl : FlowControl, IDOMPaintable, INotifyPropertyChanged, IContainer, IContainerControl, IControlHost, IColorRoleableControl, IGridSource, IFillReportsMinimumHeight, IInteractiveControl, IFocusableControl, IMouseAwareControl, IWindowControl, IDisposable, IFocusScope, ILogicalCursorProvider, ICursorShapeProvider
Inheritance
WizardControl
Implements
Inherited Members
Extension Methods

Remarks

It IS a FlowControl. WizardControl subclasses FlowControl the same way PanelControl subclasses CollapsiblePanel — a presetted, honestly-named specialization, not a wrapper. It inherits the entire inline-flow surface (rendering, focus/child hosting, AsHost(), the Run<TState>(FlowWizardBuilder<TState>) path, the idle Placeholder). It adds only a wizard-flavoured identity: a discoverable type name (reach for new WizardControl() when you want a wizard) and a wizard-friendly default placeholder. It does not re-implement the wizard loop or re-declare Run — the inherited Run<TState>(FlowWizardBuilder<TState>) is the entry point, unchanged.

Generics live on the builder, not the control. The control is non-generic (so it drops cleanly into the control tree and collections like every other control); the wizard's state type stays on Wizard<TState>() (the builder), where it is used to author strongly typed steps and surfaces as FlowResult<T>.

Scope. WizardControl runs a wizard inline (it is a FlowControl). To run a wizard as a modal instead, use Flow.Wizard<TState>()...Run(ws, parent) directly.

var wiz = new WizardControl();
panel.AddControl(wiz);
var result = await wiz.Run(Flow.Wizard<InstallState>()
    .WithStepIndicator()
    .Step((ctx, s) => ...)
    .Step((ctx, s) => ...));

Constructors

WizardControl()

Initializes a new WizardControl with a wizard-friendly idle placeholder. The placeholder is replaced by the wizard's steps while a wizard is running and restored when it ends; assign Placeholder to override it.

public WizardControl()