postpartum-genushyacinthus29/dotnet-skills/dotnet-winui

Claude Code and agent skill by postpartum-genushyacinthus29/dotnet-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Build or review WinUI 3 applications with the Windows App SDK, including MVVM patterns, packaging decisions, navigation, theming, windowing, and interop boundaries with other .NET stacks. Use when building modern Windows-native desktop UI.

Install

npx vskill@latest install postpartum-genushyacinthus29/dotnet-skills/dotnet-winui

SKILL.md

The same SKILL.md was published earlier as postpartum-genushyacinthus29/dotnet-skills/dotnet-winui.

WinUI 3 and Windows App SDK

Trigger On

  • building native modern Windows desktop UI on WinUI 3
  • integrating Windows App SDK features into a .NET app
  • deciding between WinUI, WPF, WinForms, and MAUI for Windows work
  • implementing MVVM patterns in Windows App SDK applications

Workflow

  1. Confirm WinUI is the right choice — use when modern Windows-native UI, Fluent Design, and Windows App SDK capabilities are needed. For cross-platform, consider MAUI instead.
  2. Choose packaging model early — packaged (MSIX) vs unpackaged differ materially for deployment, identity, and API access:

``xml <!-- Unpackaged: add to .csproj --> <WindowsPackageType>None</WindowsPackageType> ``

  1. Apply MVVM pattern with the MVVM Toolkit — keep views dumb, logic in ViewModels:

```csharp public partial class ProductsViewModel : ObservableObject { [ObservableProperty] private ObservableCollection<Product> _products = [];

[ObservableProperty] [NotifyCanExecuteChangedFor(nameof(DeleteCommand))] private Product? _selectedProduct;

[RelayCommand(CanExecute = nameof(CanDelete))] private async Task DeleteAsync() { if (SelectedProduct is null) return; await _productService.DeleteAsync(SelectedProduct.Id); Products.Remove(SelectedProduct); } private bool CanDelete() => SelectedProduct is not null; } ```

  1. Use x:Bind for compiled bindings — better performance and compile-time checking than {Binding}:

``xml <TextBlock Text="{x:Bind ViewModel.Title, Mode=OneWay}"/> ``

  1. Wire DI through `Host.CreateDefaultBuilder` — register services, ViewModels, and views. Resolve via App.GetService<T>().
  2. Implement navigation service — map ViewModels to Pages by convention. See references/patterns.md for the full pattern.
  3. Handle Windows App SDK features — windowing (AppWindow), custom title bar, app lifecycle, notifications.
  4. Always set `XamlRoot` when showing ContentDialog — omitting this causes silent failures.
  5. Validate on Windows targets — behavior depends on runtime, packaging model, and Windows version.
mermaid
flowchart LR
A["Choose WinUI"] --> B["Select packaging model"]
B --> C["MVVM + DI setup"]
C --> D["Navigation and views"]
D --> E["Windows App SDK features"]
E --> F["Validate on target runtime"]

Key Decisions

DecisionGuidance
Packaged vs unpackagedPackaged (MSIX) for Store, auto-update, and full API access; unpackaged for simpler deployment
x:Bind vs BindingAlways prefer x:Bind — compiled, faster, type-safe
MVVM Toolkit attributesUse [ObservableProperty], [RelayCommand] to eliminate boilerplate
NavigationConvention-based ViewModel→Page mapping via navigation service
ThemingUse RequestedTheme on root element; respect system theme by default

Deliver

  • modern Windows UI code with clear platform boundaries
  • explicit deployment and packaging assumptions
  • MVVM pattern with testable ViewModels
  • cleaner interop between shared and Windows-specific layers

Validate

  • WinUI is chosen for a real product reason, not defaulted to
  • Windows App SDK dependencies are explicit in the project file
  • packaging and runtime assumptions are tested on target
  • x:Bind is used for compiled bindings throughout
  • navigation and ContentDialog both work with correct XamlRoot
  • custom title bar renders correctly on Windows 10 and 11

References

  • references/patterns.md - WinUI 3 patterns including MVVM, navigation services, DI setup, windowing, theming, dialogs, and lifecycle handling
  • references/anti-patterns.md - common WinUI mistakes with explanations and corrections

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/postpartum-genushyacinthus29/dotnet-skills/dotnet-winui/badge)](https://verified-skill.com/skills/postpartum-genushyacinthus29/dotnet-skills/dotnet-winui)

Something wrong with this skill or its page? Tell us.