winui-architect
Architect-level Windows-native design — WinUI 3 and WPF selection, XAML composition and MVVM, MSIX packaging and identity, Windows integration (notifications, file associations, shell), and the deployment model enterprise customers expect. Use when the app must be Windows-native.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- winui-architect
- license
- MIT
- metadata
- { "crusor-path": "desktop-architect/runtimes-architect/winui-architect", "crusor-domain": "desktop-architect", "crusor-origin": "original", "crusor-sources": "learn.microsoft.com/windows/apps/winui/winui3; learn.microsoft.com/dotnet/desktop/wpf; learn.microsoft.com/windows/msix", "crusor-triggers": "winui, wpf, windows app sdk, xaml, msix, windows native, dotnet desktop, windows shell integration", "crusor-verified-on": "2026-10-30" }
- description
- Architect-level Windows-native design — WinUI 3 and WPF selection, XAML composition and MVVM, MSIX packaging and identity, Windows integration (notifications, file associations, shell), and the deployment model enterprise customers expect. Use when the app must be Windows-native.
- compatibility
- WinUI 3, WPF, .NET 8, MSIX
03 SKILL.md 正文
WinUI / WPF Architect
Windows-native means shell integration and enterprise deployment, not just a XAML window. The packaging decision shapes everything downstream.
When to use
- Deep Windows integration: shell, file associations, background tasks, enterprise deployment.
- Existing .NET desktop estate.
- Performance-critical UI that a webview cannot deliver.
When NOT to use
- Cross-platform is a hard requirement → Electron/Tauri.
- The team is web-only and the app is a form over an API.
Decision 1 — Framework
| Choice | When |
|---|---|
| WinUI 3 | new apps, Fluent design, Windows App SDK |
| WPF | existing .NET Framework/XAML investment |
| Windows Forms | internal tools, legacy maintenance |
| MAUI | .NET across Windows/mobile (weaker desktop shell) |
- WinUI 3 for new work; WPF remains valid where the codebase is large and stable.
- Do not mix UI frameworks in one app; interop is a permanent tax.
Decision 2 — Packaging
| Packaging | Consequences |
|---|---|
| MSIX | identity, clean uninstall, store, auto-update |
| unpackaged (exe/msi) | more install freedom, fewer APIs, manual updates |
- MSIX gives a package identity required for notifications, startup tasks, and some shell APIs.
- Enterprise: provide both where needed, with a documented silent-install path.
- Code-sign everything; unsigned installers trigger SmartScreen.
Decision 3 — Architecture
- MVVM with a view-model per screen; no business logic in code-behind.
- Dependency injection via the host builder; no static service locators.
- Long operations on background threads; UI thread only for binding updates.
- Navigation service owning the frame/stack; deep links map into it.
Decision 4 — Windows integration
- Toast notifications with an AppUserModelID (needs identity).
- File associations and "Open with" declared in the manifest.
- Jump lists, taskbar progress, and thumbnail toolbars where they add value.
- Tray icon: background behaviour must be explicit — closing a window is not quitting.
- Credential storage in Windows Credential Manager/DPAPI, not a settings file.
Decision 5 — Deployment and updates
- MSIX + App Installer for auto-update, or your own updater for unpackaged builds.
- Per-user vs per-machine install decided by IT requirements, not preference.
- Respect MDM/Intune policies; provide an ADMX template if you have settings.
- Test on Windows 10 (oldest supported), Windows 11, ARM64, and a clean VM without the .NET runtime if self-contained packaging.
Failure modes at scale
- Unpackaged build, then notifications silently unavailable.
- Code-behind with business logic; untestable and duplicated.
- Per-machine install requiring admin; enterprise rollout blocked.
- Tray app that keeps running after "close", confusing users and IT.
- ARM64 build missing; Surface and Snapdragon devices run under emulation.
Verification receipts
- Framework and packaging decision with the constraint that drove it.
- MVVM structure with a view model unit test.
- Toast notification and file association working from an installed MSIX.
- Silent install and uninstall tested on a clean VM.
- Build matrix: Windows 10, Windows 11, ARM64.
04 同仓库更多 Skills
interaction-patterns-architect
Architect-level interaction design in code — choosing established patterns over invented ones, feedback and latency behaviour, destructive-action safeguards, navigation and overlay conventions, and the state model behind every interactive surface. Use when a screen has to behave, not just look.
design-system-ops-architect
Architect-level operation of a design system in code — token pipelines and versioning, component API and variant policy, the catalogue as the contract, adoption metrics, and the governance that stops a system from forking into three. Use when a component library must survive several teams.
design-handoff-architect
Architect-level design handoff — what must be specified before implementation starts, tokens over raw values, responsive and content-limit contracts, state matrices, and the review loop that catches drift between design and code. Use when a design is about to become code.
content-microcopy-architect
Architect-level UI content — where strings live, voice and terminology consistency, error and empty-state copy as part of the interface, translation-ready authoring, and the content model a product needs before it multiplies screens. Use when the words in the interface matter as much as the pixels.
ui-ux-implementation-architect
Architect-level direction for turning a design into working UI — the handoff contract, component ownership versus screen-level layout, interaction and state conventions, design QA gates, and the review habits that keep an implementation faithful without frozen pixels. Use before any specific UI implementation skill.
test-strategy-architect
Architect-level test strategy — allocating assertions across unit, integration, contract and end-to-end layers, designing for testability through dependency boundaries, fixture and data strategy, and the flake and coverage policies that keep a suite trustworthy. Use when defining how a codebase is tested.