Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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 FOR: 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. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit
.claude/skills/managedcode-winui/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 20% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 18% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 40% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -30% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -31% | 0% |
xml <!-- Unpackaged: add to .csproj --> <WindowsPackageType>None</WindowsPackageType>
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; }
{Binding}:xml <TextBlock Text="{x:Bind ViewModel.Title, Mode=OneWay}"/>
Host.CreateDefaultBuilder — register services, ViewModels, and views. Resolve via App.GetService<T>().XamlRoot when showing ContentDialog — omitting this causes silent failures.2.3.1 adds schema-constrained Phi Silica JSON output, XamlOptionalChanges, ARM64EC support for Windows ML, Video Super Resolution improvements, and opt-in XAML startup/style/resource-lookup optimizations.1.8.11 is the current 1.8 servicing patch. It restores focus after storage pickers, fixes MRT fallback resolution, and isolates runtime base-directory environment state; retest picker return focus, resource fallback, and side-by-side runtime activation when maintaining the 1.8 line.ApplicationData.GetForUnpackaged() over registry or custom folder conventions when the app needs first-class app data storage.LocalSettings, background tasks, side-placement flyouts, MediaPlayerPresenter device loss, popup pointer replay, ItemsRepeater layouts, Windows ML, and any opted-in XAML change IDs.mermaidflowchart 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"]
| Decision | Guidance | |----------|----------| | Packaged vs unpackaged | Packaged (MSIX) for Store, auto-update, and full API access; unpackaged for simpler deployment | | x:Bind vs Binding | Always prefer x:Bind — compiled, faster, type-safe | | MVVM Toolkit attributes | Use [ObservableProperty], [RelayCommand] to eliminate boilerplate | | Navigation | Convention-based ViewModel→Page mapping via navigation service | | Theming | Use RequestedTheme on root element; respect system theme by default |
Other measured skills in the registry, with their headline benchmark lift.