winui-design
Skill1.4k starsChanged 55 days agoMITView on GitHub
Read before writing or changing WinUI 3 XAML: choosing controls, pages and navigation, layout, Fluent Design, theming, accessibility, x:Bind, real samples, and checking that APIs exist with winapp find-api. Not for WPF or WinForms UI, even if the app uses the Windows App SDK.
1 other project uses a version of this, 1 of them edited.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- jorgeasaurus/agent-skillsedited, first seen May 11, 2026
Who's talking about microsoft/winappCli
- Stack Overflow“How to launch WinUI3 app from command line”Stack Overflow · May 3, 2026 · 1 votes
- sudosubin/agents.nix“codex-plugins.github.microsoft.winappcli: init at 0.8.0”GitHub · Nov 7, 2026
- sudosubin/agents.nix“agent-plugins.github.microsoft.winappcli: 0.7.1 → 0.8.0”GitHub · Nov 7, 2026
- sudosubin/agents.nix“claude-code-plugins.github.microsoft.winappcli: 0.7.1 → 0.8.0”GitHub · Nov 7, 2026
- sudosubin/agents.nix“copilot-plugins.github.microsoft.winappcli: 0.7.1 → 0.8.0”GitHub · Nov 7, 2026
The biggest 5 of 52 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 52
Talked about on GitHub, Bluesky and Stack Overflow (52 times).
On GitHub · 50
- Nov 7, 2026codex-plugins.github.microsoft.winappcli: init at 0.8.0 — sudosubin/agents.nix0 reactions
- Nov 7, 2026agent-plugins.github.microsoft.winappcli: 0.7.1 → 0.8.0 — sudosubin/agents.nix0 reactions
- Nov 7, 2026claude-code-plugins.github.microsoft.winappcli: 0.7.1 → 0.8.0 — sudosubin/agents.nix0 reactions
- Nov 7, 2026copilot-plugins.github.microsoft.winappcli: 0.7.1 → 0.8.0 — sudosubin/agents.nix0 reactions
- Nov 7, 2026claude-code-marketplaces.github.microsoft.winappcli: 0.7.1 → 0.8.0 — sudosubin/agents.nix0 reactions
45 more on GitHub
- Nov 7, 2026agent-skills.github.microsoft.winappcli: 0.7.1 → 0.8.0 — sudosubin/agents.nix0 reactions
- Nov 7, 2026Bump the windows-app-sdk group with 3 updates — lzvsrx/LZ-AGENT0 reactions
- Nov 7, 2026codex-marketplaces.github.microsoft.winappcli: 0.7.1 → 0.8.0 — sudosubin/agents.nix0 reactions
- Nov 6, 2026Bump the dotnet-dependencies group with 6 updates — rhamenator/SimpleLoanCalculator0 reactions · 1 comment
- Nov 3, 2026UIA fails in Windows Sandbox when ProcessId is 0 — asklar/lvt0 reactions
- Oct 31, 2026Bump the windows-app-sdk group with 3 updates — k25jura/Reeled0 reactions
- Oct 31, 2026Bump the windows-app-sdk group with 3 updates — lzvsrx/LZ-AGENT0 reactions · 1 comment
- Oct 30, 2026Bump the dotnet-dependencies group with 6 updates — rhamenator/SimpleLoanCalculator0 reactions · 2 comments
- Oct 29, 2026codex-marketplaces.github.microsoft.winappcli: init at 0.7.1 — sudosubin/agents.nix0 reactions
- Oct 28, 2026claude-code-plugins.github.microsoft.winappcli: init at 0.7.1 — sudosubin/agents.nix0 reactions
- Oct 28, 2026claude-code-marketplaces.github.microsoft.winappcli: init at 0.7.1 — sudosubin/agents.nix0 reactions
- Oct 21, 2026fix(public RDTE): pin WinApp archive hash offline to survive anonymous GitHub REST limits — SemperSupra/WinInspect0 reactions
- Oct 17, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp and Microsoft.WindowsAppSDK — k25jura/Reeled0 reactions · 1 comment
- Oct 16, 2026[Feature]: Track sparse packaging workflow support and review follow-ups — microsoft/WinAppVSCE0 reactions
- Oct 16, 2026Bump coverlet.collector and 5 others — rhamenator/SimpleLoanCalculator0 reactions · 2 comments
- Oct 16, 2026chore(deps): update dependency microsoft.windows.sdk.buildtools.winapp to 0.7.1 [automerge] — DevSecNinja/home-assistant-win-companion0 reactions · 1 comment
- Oct 14, 2026agent-skills.github.microsoft.winappcli: init at 0.7.1 — sudosubin/agents.nix0 reactions
- Oct 8, 2026[Candidate] microsoft/winappcli/.github/skills/pr-lifecycle - pr-lifecycle — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 8, 2026[Candidate] microsoft/winappcli/.github/skills/code-quality - code-quality — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 8, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp from 0.3.2 to 0.7.1 — trsdn/md2loop-windows0 reactions
- Oct 7, 2026Add WinDbg diagnosis plugin — microsoft/win-dev-skills0 reactions · 2 comments
- Oct 7, 2026docs: broaden scope to Windows development and debugging — microsoft/win-dev-skills0 reactions · 1 comment
- Oct 4, 2026copilot-plugins.github.microsoft.winappcli: init at 0.7.1 — sudosubin/agents.nix0 reactions
- Oct 4, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp from 0.7.0 to 0.7.1 — mirrorpulse/MirrorPulse0 reactions
- Oct 4, 2026agent-plugins.github.microsoft.winappcli: init at 0.7.1 — sudosubin/agents.nix0 reactions
- Oct 3, 2026[Workstream F] PR 5 of 5: An in-session UI Automation helper drives the interactive desktop by element, not coordinates — zaxbysauce/zaxby-hyperv-mcp0 reactions · 8 comments
- Oct 3, 2026Bump the windows-app-sdk group with 2 updates — lzvsrx/LZ-AGENT0 reactions · 2 comments
- Oct 3, 2026chore(deps-node): update dependency @microsoft/winappcli to v0.7.1 — scottlz0310/md-peruse0 reactions
- Oct 2, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp from 0.6.1 to 0.7.1 — Has-X/Registry0 reactions
- Oct 2, 2026Bump the dotnet-dependencies group with 6 updates — rhamenator/SimpleLoanCalculator0 reactions · 2 comments
- Oct 2, 2026Update dependency Microsoft.Windows.SDK.BuildTools.WinApp to 0.7.1 - autoclosed — mfakane/azunyan0 reactions
- Oct 2, 2026fix(deps): update dependency microsoft.windows.sdk.buildtools.winapp to 0.7.1 — sebdanielsson/varys0 reactions
- Sep 26, 2026Bump the windows-app-sdk group with 2 updates — lzvsrx/LZ-AGENT0 reactions · 1 comment
- Sep 25, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp from 0.6.1 to 0.7.0 — Has-X/Registry0 reactions · 1 comment
- Sep 25, 2026Bump the dotnet-dependencies group with 6 updates — rhamenator/SimpleLoanCalculator0 reactions · 2 comments
- Sep 24, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp from 0.3.2 to 0.7.0 — trsdn/md2loop-windows0 reactions · 1 comment
- Sep 18, 2026Bump the dotnet-dependencies group with 6 updates — rhamenator/SimpleLoanCalculator0 reactions · 2 comments
- Sep 12, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp from 0.5.0 to 0.6.1 — jacob-krarup-madsen/WinForge0 reactions · 1 comment
- Sep 11, 2026Bump the dotnet-dependencies group with 6 updates — rhamenator/SimpleLoanCalculator0 reactions · 2 comments
- Sep 4, 2026UI 驱动三选一:winapp ui、FlaUI、UIAutomationClient — trytoreachpeak0/8005-test-lab0 reactions · 2 comments
- Sep 3, 2026refactor: migrate MSIX packaging/signing to Microsoft's winapp CLI — recregt/winsp0 reactions
- Sep 3, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp from 0.3.2 to 0.6.1 — trsdn/md2loop-windows0 reactions · 1 comment
- Sep 1, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp from 0.6.0 to 0.6.1 — onlytrisdev/chrome-native-adblock0 reactions
- Aug 14, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp from 0.3.1 to 0.6.0 — Has-X/Registry0 reactions · 1 comment
- Jul 2, 2026using winapp cii — peaceshi/Avalonia-NativeAOT-SingleFile0 reactions
On Bluesky · 1
- May 6, 2026Does winappcli help? github.com/microsoft/wi... — @drustheaxe.bsky.social0 likes and reposts · 1 reply
On Stack Overflow · 1
- May 3, 2026How to launch WinUI3 app from command line1 vote
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- jorgeasaurus/agent-skills★ 1419% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- code-qualitySkill
- pr-lifecycleSkill
- pr-reviewSkill
- spec-reviewSkill
- winapp-find-apiSkill
- winapp-find-uiSkill
- winapp-frameworksSkill
- winapp-identitySkill
- winapp-manifestSkill
- winapp-mauiSkill
- winapp-packageSkill
- winapp-performanceSkill
- winapp-sandboxSkill
- winapp-setupSkill
- winapp-signingSkill
- winapp-troubleshootSkill
- winapp-ui-automationSkill
- winui-devtoolsSkill
- winui-code-reviewSkill
- winui-dev-workflowSkill
- winui-packagingSkill
- winui-setupSkill
- winui-ui-testingSkill
- winui-wpf-migrationSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Before coding API assumptions, run from the restored app project directory so winapp find-api uses its exact references, not a sample's …
- Very specific: line 47
Before writing XAML, map the requirement to a platform control.
- Very specific: line 54
If the mapping above doesn't fit, run winapp find-ui "<intent>" before improvising.
- Distinctive: line 65
Document / canvas / media editor → 1280+ wide
- Very specific: line 91
Don't size the window by setting Width/Height on the root Grid — that clips content, not the window.
- Very specific: line 114
Default trigger resolves to LostFocus specifically for TextBox.Text (most other properties default to PropertyChanged).
- Very specific: line 161
Never set HighContrastAdjustment="None" unless your app already supplies system-aware brushes throughout.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Scope: WinUI 3 apps only. The Windows App SDK is not WinUI. A WPF, WinForms, Electron, or other app that references the Windows App SDK (for notifications, packaging, or other APIs) is not a WinUI app; keep its framework and don't apply this skill unless the task is to port it to WinUI 3. A WinUI 3 project has <UseWinUI>true</UseWinUI> or uses Microsoft.UI.Xaml.
Search samples before writing XAML
This workflow requires WinApp CLI 0.7+. Use winapp find-ui for grounded control and sample discovery. Front-load lookups, then code:
winapp find-ui "<focused feature>" # compact matches + scenario IDs
winapp find-ui --id <scenario-id> # full XAML/C# + prerequisite notes
winapp find-ui --id <id-1> --id <id-2> --json # batch, structured output
winapp find-ui --list # browse all default-source scenarios
winapp find-ui "<feature>" --refresh # force a corpus refreshDefault search covers the WinUI Gallery, Windows Community Toolkit, and curated core patterns. Reactor's C#-only/MVU samples are opt-in with --source reactor; use them only for Reactor projects. The Gallery/Toolkit/Reactor corpus is fetched and cached by WinApp CLI, while core patterns work offline.
Verify APIs against the restored project
Before coding API assumptions, run from the restored app project directory so winapp find-api uses its exact references, not a sample's possibly newer package versions:
winapp find-api InfoBar --json --project-dir .
winapp find-api check-property InfoBar Severity IsOpen Message Title --json --project-dir .
winapp find-api members NavigationView --filter selected --json --project-dir .Use either --project-dir <app-directory> (defaults to cwd) or --project <name> to select among multiple projects, never both. An unscoped query from a repo root or sibling project may target the wrong API surface. --project sdk searches only the installed machine SDK, not the app's NuGet references. If results look stale, check restore/project selection before refreshing. Use winapp find-api --help for discovery/index commands rather than guessing an API from memory; use find-ui for the usage pattern.
App-shape anchors
Pick the closest shipping app silhouette before laying out a page:
| App type | Anchor controls | Reference apps |
| Settings / config tool | NavigationView Left + SettingsCard / SettingsExpander | Windows Settings, Slack |
| Document / session editor | TabView + full-bleed content, light chrome | Windows Terminal, VS Code, Notepad |
| Hierarchical browser | TreeView + ListView + BreadcrumbBar | File Explorer, Outlook |
| Developer tool / dashboard | NavigationView + card layout | Dev Home, GitHub Desktop |
| Single-purpose utility | Mode switcher + compact grid | Calculator, Snipping Tool |
| Media / canvas / hero | Grid with hero surface, floating commands, no NavigationView | Photos, Spotify, Clipchamp |
Reach-for-this control map
Before writing XAML, map the requirement to a platform control. These mappings exist to short-circuit cross-framework instincts (WPF DataGrid, web <select>, HTML <input type=date>):
- Navigation: 2–7 sections →
NavigationView; document/session tabs →TabView; breadcrumb trail →BreadcrumbBar; 2–3 modes →SelectorBar. - Data display: Vertical list →
ListView; tiles/grid →GridVieworItemsRepeater+UniformGridLayout; hierarchy →TreeView; tabular →ListViewwith aGrid-basedItemTemplateand a headerGridabove (WinUI has noDataGrid; don't default toCommunityToolkit.WinUI.Controls.DataGrid— its columns can't usex:Bind); master-detail →ListView+ detailGrid. - Input: Text →
TextBox; number →NumberBox; search →AutoSuggestBox; date →CalendarDatePicker; boolean →ToggleSwitch; pick one from 2–3 →RadioButtons; pick one from 4+ →ComboBox. - Feedback: Blocking decision →
ContentDialog; contextual action →Flyout/MenuFlyout; onboarding / hint →TeachingTip; inline status / async progress →InfoBar; system notification →AppNotification.
If the mapping above doesn't fit, run winapp find-ui "<intent>" before improvising.
Window sizing (WinUI 3 specifics)
WinUI 3 has no
SizeToContent. Without an explicit size, Windows defaults the main window to ~1024×768 — oversized for most utilities. Size it inMainWindow's constructor.
Rubric. Width = widest row + 48 padding, rounded up to nearest 20. Height = 32 (titlebar) + Σ(row heights) + Σ(spacing) + 48 padding, rounded up to 20. Round up — clipped content is a worse failure than a slightly-wide window. Sanity ranges (derive yours from the rubric):
- Single-purpose utility → ~440–560 wide
- Form / single-page tool → ~600–800 wide, ~640–800 tall
- Multi-pane (nav + content) → ~1100–1300 wide, ~720–840 tall
- Document / canvas / media editor → 1280+ wide
AppWindow.Resize takes physical pixels, not DIPs — multiply by the monitor's DPI scale. XamlRoot.RasterizationScale is null in the constructor and stale after AppWindow.Move, so [DllImport] GetDpiForWindow is the cleanest path:
using Microsoft.UI;
using Microsoft.UI.Windowing;
using System.Runtime.InteropServices;
using Windows.Graphics;
public sealed partial class MainWindow : Window
{
[DllImport("user32.dll")]
private static extern uint GetDpiForWindow(IntPtr hWnd);
public MainWindow()
{
InitializeComponent();
var hwnd = Win32Interop.GetWindowFromWindowId(AppWindow.Id);
var scale = GetDpiForWindow(hwnd) / 96.0;
// widthDip / heightDip come from the rubric above — derive, don't copy.
AppWindow.Resize(new SizeInt32((int)(widthDip * scale), (int)(heightDip * scale)));
}
}Don't size the window by setting Width/Height on the root Grid — that clips content, not the window.
XAML landmines (the things you'll otherwise ship broken)
Check the effective x:Bind mode
x:Bind defaults to OneTime unless an inherited x:DefaultBindMode changes it. Use OneWay/TwoWay plus change notifications for dynamic data; explicit Mode overrides the inherited default. Stable command/event bindings need no blanket mode rewrite.
<!-- Without an inherited default, this is OneTime -->
<TextBlock Text="{x:Bind Vm.Status}" />
<!-- Updates when Vm raises the relevant change notifications -->
<TextBlock Text="{x:Bind Vm.Status, Mode=OneWay}" />In a page/window, x:Bind resolves against code-behind (e.g., its Vm property), not DataContext. Use x:DataType on typed DataTemplates, not on Page to set a VM. Runtime {Binding}/DisplayMemberPath can be appropriate; for AOT, their source classes may need partial plus [WinRT.GeneratedBindableCustomProperty]. See winui-packaging's references/sourcegen-patterns.md instead of treating all runtime binding as unsupported.
TextBox two-way needs UpdateSourceTrigger=PropertyChanged
<TextBox Text="{x:Bind Vm.Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />Default trigger resolves to LostFocus specifically for TextBox.Text (most other properties default to PropertyChanged). The VM is not updated per keystroke, and UIA keyboard-simulation tests (WinAppDriver SendKeys, etc.) that assert immediately after typing will see stale VM state until focus moves.
Attached properties from C# use static setters, not initializers
using Microsoft.UI.Xaml.Automation;
// ❌ WRONG — does not compile. CS0117: 'Button' does not contain a definition for 'AutomationProperties'.
// AutomationProperties is a static class of attached-property accessors, not an instance member.
var btn = new Button { AutomationProperties = { AutomationId = "BtnSave" } };
// ✅ CORRECT
var btn = new Button { Content = "Save" };
AutomationProperties.SetAutomationId(btn, "BtnSave");
AutomationProperties.SetName(btn, "Save button");
Grid.SetRow(btn, 1);
ToolTipService.SetToolTip(btn, "Save the current document");Converter={x:Null} crashes x:Bind at runtime
{x:Bind} requires Converter to be a {StaticResource} lookup. Converter={x:Null} compiles but the generated code calls LookupConverter(""), which returns null, then dereferences it — you get Resource Dictionary Key can only be String-typed / NullReferenceException on first activation of the binding. If you don't want a converter, omit the property entirely.
Prefer x:Bind static functions over IValueConverter
// MainPage.xaml.cs
public static Visibility BoolToVisibility(bool v) => v ? Visibility.Visible : Visibility.Collapsed;
public static Visibility InvertBoolToVisibility(bool v) => v ? Visibility.Collapsed : Visibility.Visible;
public static bool Not(bool v) => !v;<TextBlock Visibility="{x:Bind local:MainPage.BoolToVisibility(Vm.IsLoading), Mode=OneWay}" />
<Button IsEnabled="{x:Bind local:MainPage.Not(Vm.IsLoading), Mode=OneWay}" />Acrylic and ThemeShadow rendering rules
BackgroundSizingdefaults toInnerBorderEdgeon bothBorderandControl, which correctly clips acrylic to the inner stroke. The hazard is the opposite of intuition: don't change it toOuterBorderEdgeon a bordered acrylic surface — that's what makes the material bleed past the stroke.ThemeShadowcasts a shadow from the caster'sTranslationZ. Microsoft's recommended elevations are16for tooltips,32for popup/flyout UI,128for dialogs — pick by surface type. For non-popup casters, add the surfaces it should land on toThemeShadow.Receivers; otherwise the shadow has nothing to fall on and looks clipped.
Theming rules (short version)
{ThemeResource ...}at usage sites (updates on theme switch).{StaticResource}insideThemeDictionariesfor theme-local definitions;SystemAccentColor/SystemColor*are the exceptions and stay{ThemeResource}.- Custom theme dictionaries cover
Light,Dark, andHighContrastexplicitly — neverDefault. - Name resources by purpose (
CardBackgroundBrush,DangerTextBrush), not hue. - Light/Dark working ≠ High Contrast working. Test in a Contrast theme separately.
- Never set
HighContrastAdjustment="None"unless your app already supplies system-aware brushes throughout.
Anti-patterns
| ❌ Don't | ✅ Do instead |
Reflexively build every app as NavigationView Left | Pick the closest row in the silhouette table; hero / document / utility shapes are equally valid |
| Treat brand colour or tinted backdrop as off-pattern | Overriding SystemAccentColor or using a tinted DesktopAcrylicBackdrop is how Microsoft's own first-party apps differentiate |
| Tiny content island on an oversized window | Either size the window to the content (see Window sizing) or let content fill the available space |
| Custom pill / segmented tab switcher built by hand | NavigationView Top or SelectorBar |
| Equal-width 50/50 column split where one pane is structural | Stable size for the structural pane, flexible for content — only if a structural pane is part of the silhouette at all |
Hard-coded color literals (#RRGGBB, White) | {ThemeResource} brushes by semantic name |
ScrollViewer wrapped around a ListView / GridView | The collection control already scrolls — give it a constrained height |
Custom ControlTemplate for a standard control | Built-in control + lightweight style overrides |
| Placeholder text used as the only field label | Always provide a visible label |
| Required commands hidden at small widths with no route | Overflow menu, secondary surface, or a responsive promotion rule |
Modal ContentDialog for non-blocking hints | TeachingTip, InfoBar, or inline status |
| Destructive action (Delete / Discard / Reset) fired without confirmation | ContentDialog with verb-labelled primary action and Cancel secondary; surface item identity (name, count) in the body |
Custom list control when ListView / GridView fits | Use the platform collection + virtualisation |
Build custom UI only when all are true: no platform/Gallery/Toolkit control fits; you'll implement keyboard, focus, UI Automation, theme resources, High Contrast, and responsive behaviour; you have specs for default/hover/pressed/disabled/selected/focused/error states; you've tested with keyboard and a contrast theme.
References (load on demand)
| File | Load when… |
references/brushes-and-icons.md | Looking up a brush key by purpose, picking between Icon / IconSource slots, choosing among FontIcon / SymbolIcon / PathIcon / etc. |
references/theme-accessibility.md | Authoring theme dictionaries, custom brushes/styles/templates, or High Contrast support. |
references/layout-review.md | Reviewing responsive behaviour, breakpoints, or empty/loading/error coverage on a data-driven page. |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

