Instruction file imported from JDKoll1982/MTM_Waitlist (
.github/instructions/demos/Platform/DeploymentDemo.instructions.md). Copyright stays with the author.
Deployment & runtime check
| Ecosystem | Windows App SDK |
| Category | Platform services |
| Level | Advanced |
| API | Microsoft.Windows.ApplicationModel.WindowsAppRuntime.DeploymentManager |
| Page | Platform/DeploymentDemo (WinUI3LearningLab.Demos.Platform.DeploymentDemo) |
| Kind | Live, interactive demo |
| Run it | WinUI3LearningLab.App.exe --demo deployment |
What it teaches
Asks the bootstrapper which Windows App SDK runtime is installed, and whether a repair or update is needed.
How the demo is built
The page is a UserControl at Platform/DeploymentDemo.xaml, paired with DeploymentDemo.xaml.cs. The shell hosts it inside Shell/DemoPage.xaml, which also shows both files verbatim — the snippet viewer reads the same source the app compiles, so what is displayed is always what runs.
Layout. Root UserControl with 16 element(s).
Named elements the code-behind touches: StatusText, LastActionText.
Wired in XAML: OnGetStatusClicked().
Code-behind. Handlers OnGetStatusClicked(). 52 line(s), including the comments that record what the control does that the docs do not say.
Anything the demo cannot show is explained on the page rather than faked: the same rules the rest of the repo follows are in .github/instructions/winui3-api-rules.instructions.md.
MTM use case
MTM_Waitlist › Settings persistence and start-up
Effective settings are resolved from several scopes and cached at start-up, and every change is versioned in a history table. Persistence, the UI thread and theme resolution are the plumbing that has to keep working when nothing is being demoed.
Schema this mirrors: config_settings_values, config_settings_history, usr_settings. Sample data for the page comes from src/WinUI3LearningLab.Core/LabData.cs — part numbers, bins, dunnage types and work orders, never Item 1 or John Doe.
Gotchas
- A self-contained app carries the runtime and does not need this — the check is for framework-dependent apps.
- DeploymentManager.GetStatus reports package and feature state; it does not install anything.
- Offline repair needs the installer; calling Initialize on a broken deployment fails with a specific HRESULT worth logging.
Try this
- Run
WinUI3LearningLab.App.exe --demo deployment. The page showsDeploymentDemo.xamlandDeploymentDemo.xaml.csbeside the live demo, so the next edit can be made against something already running. - Change one value in the XAML and rebuild; the snippet viewer re-reads the file, so what is shown stays the code that compiled.
Documentation
- Microsoft.Windows.ApplicationModel.WindowsAppRuntime.DeploymentManager
- WinUI 3 API rules for this repo
- Design system
Generated from DemoCatalog by --export-instructions. Do not edit by hand: change the descriptor in src/WinUI3LearningLab.Core/Catalog/Platform.cs or the demo source, then regenerate.
