Skip to main content

Containers, Layouts, Navigation, and Reuse

This example is the real Operations Console shell — a ToolBar docked Top, a StatusBar docked Bottom and a SplitContainer splitMain docked Fill, with the navigation list in Panel1 and a TabControl tabDetail in Panel2, one TabPage per peer section. The repeated record header and status strip are the RecordHeader and StatusStrip UserControls (Title, RecordCount, LastRefresh, RefreshRequested). A narrow client profile collapses the navigation and shows btnMobileMenu, and the StatusBar shows the active profile, record count, selected record and last refresh.

Editors comes from Module 2; Lists and Trees, DataGridView, Dashboard and Widgets are still placeholders.

Run it

cd "LearnWisej-Samples/Mastering the Control Library Course/Module 3/OperationsConsole"
dotnet run -f net10.0 --urls http://localhost:5703

Then open http://localhost:5703.

What to try

ActionWhat you should see
Nothing yetthe Layouts tab is open; StatusBar Showing Layouts, Desktop profile · Desktop, 6 records, Record: LAY-001
Click a card chipthe form fills with Region / Container / Why; StatusBar Record: LAY-004
Click a section in the navigation list, or a tabthe list and the tabs stay in step; the page is created on first use
New (Layouts tab)a new chip appears, Added LAY-007 to Layouts., 7 records, Toast
New / Save on a placeholder tabamber "New is not available …" / "Nothing to save …"
Refreshthe chips are rebuilt, Refreshed: HH:mm:ss in the StatusBar and in both UserControls
Save right after a Refreshamber "Nothing has changed on Layouts since the last save."
New, then Savegreen "Saved 7 layout cards."
Tick Simulate service failure, New, Savered "Layouts could not be saved …" + Toast; untick and Save again to recover
Resize the browser under 1025 pxthe navigation collapses, ☰ Sections appears, StatusBar Narrow profile · Tablet, the Layouts content stacks into one column
☰ Sectionsthe six sections plus Show the navigation panel
Refresh in the record header, or in the stripboth raise RefreshRequested; the same RefreshSection() runs
Right-click the navigation listRefresh / New / Save — the same command methods as the ToolBar

Where things live

OperationsConsole/
├─ MainPage.cs / .Designer.cs toolBar (Top), statusBar (Bottom), splitMain (Fill); navList | tabDetail; ApplyNarrowProfile
├─ Shell/ ISectionRecords.cs RecordCount / NewRecord() / Save() → SectionSaveResult
│ RecordHeader, StatusStrip the two reusable UserControls
├─ Sections/LayoutsPage.cs cards (FlowLayoutPanel), selected card (TableLayoutPanel), the two UserControls
├─ Models/LayoutCard.cs, Services/LayoutCardService.cs (SimulateFailure)
└─ docs/LayoutNotes.md, docs/ContainerDecisions.md