WinFormFormHost

Defined in TheTechIdea.Beep.Forms.WinForms/Forms/FormHost/WinFormFormHost.cs — a partial class split across roughly 18 files by concern (Alerts, Audit, Blocks, Menu, Query, Triggers, and more). This is what a WinForms developer actually touches:

MemberTypeWhat it does
DefinitionFormDefinitionDesign-time block declarations. Generated code does _formsHost.Definition.Blocks.Add(ordDefinition).
FormsManagerIUnitofWorksManager?Assigning it triggers the real bind sequence — see below.
ActiveBlockNamestringThe block currently in focus.
FormFactoryIWinFormFormsFactoryNeeded for CALL_FORM to open another form.
ActiveBlockChangedeventFires when focus moves to a different block.
NotificationRaisedeventEngine-raised notifications surface here.
MessageRaised / MessageClearedeventStatus-bar-style message lifecycle.
TimerFiredeventA registered CREATE_TIMER elapsed.
FormMessageReceivedeventCross-form messaging (used by CALL_FORM parameter passing).

What assigning FormsManager actually does

Setting FormsManager to a real IUnitofWorksManager runs the bind sequence:

  1. DefinitionBlockRegistrar.RegisterAll(manager, Definition) turns the design-time blocks into live engine blocks.
  2. Every IBlockView discovered in the host's control tree is bound to its matching engine block.
  3. AutoWireSurfaces() / RefreshStatusSurfaces() sweep the control tree for status/nav-bar controls and wire them up automatically — there is no manual event wiring beyond naming your blocks and dropping controls into the tree.
The bind is transactional

If any exception happens mid-bind, every partially-bound block is unbound and the previous manager is restored before the exception is rethrown. A failed manager swap never leaves the host half-bound.

Multiple blocks, one host

Sibling WinFormBlockHost controls — one per block, named to match BlockDefinition.BlockName — coexist directly in the form host's control tree and are auto-discovered. There's no per-host limit on how many blocks can be visible simultaneously; a master-detail screen (see the Order Entry example) is just two WinFormBlockHost controls inside one WinFormFormHost.

This is where WPF differs

BeepWpfForms shows only one active block per host — see WPF Runtime for what that means for master-detail on WPF.