BumpyClock/agent-templates / skills_archive/winui3-csharp-app
winui3-csharp-app
VerifiedWinUI 3 / Windows App SDK desktop apps in C#/XAML. MVVM, bindings, navigation, Mica/Acrylic, windowing, packaging, performance.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.1 KB |
| agents/openai.yaml | config | 176 B |
| references/design-fluent.md | markdown | 1.4 KB |
| references/foundations.md | markdown | 3.2 KB |
| references/performance.md | markdown | 1.9 KB |
| references/ui-ux.md | markdown | 3.4 KB |
| references/windowing.md | markdown | 2.1 KB |
references/performance.md
View on GitHub# Performance and Bindings
Use for slow UI, jank, bindings, large lists.
## Compiled bindings
- `{x:Bind}` faster + lower memory than `{Binding}` because compile-time code.
- `{x:Bind}` defaults `OneTime`; `{Binding}` defaults `OneWay`. Use `OneWay`/`TwoWay` only when UI must track changes.
- Use `x:DefaultBindMode` for subtree default with `{x:Bind}`.
- In `DataTemplate`, set `x:DataType` so `{x:Bind}` compiles + validates path.
## Deferred UI with x:Load
- `x:Load` can reduce startup/memory; unloaded elements release memory and use placeholder.
- Each `x:Load` element adds about 600 bytes overhead; use on heavy, rarely shown UI.
- `x:Load` requires `x:Name`; works only on `UIElement` or `FlyoutBase`. Not root elements, `DataTemplate`, `ResourceDictionary`, or loose `XamlReader.Load` content.
- Unloaded elements lose state; restore via bindings or `Loaded` handlers.
## List virtualization and template cost
- Large lists: UI virtualization first.
- Keep `ItemsPanel` as `ItemsStackPanel` or `ItemsWrapGrid`; avoid `StackPanel`, `WrapGrid`, `VariableSizedWrapGrid` because they disable virtualization.
- Avoid unbounded panels (`ScrollViewer`, auto-sized `Grid`) around virtualized lists; constrain size so virtualization can calculate viewport.
- Minimize `DataTemplate` elements; every element multiplies by item count.
- Use `ListViewItemPresenter` in custom templates for stable list perf.
- Use `x:Phase` to progressively render heavy visuals after first pass.
## Performance fundamentals
- Optimize memory, disk footprint, power, responsiveness.
- Define key interaction scenarios; add ETW events to measure before/after.
Source pointers:
- https://learn.microsoft.com/en-us/windows/uwp/xaml-platform/x-bind-markup-extension
- https://learn.microsoft.com/en-us/windows/uwp/xaml-platform/x-load-attribute
- https://learn.microsoft.com/en-us/windows/uwp/debug-test-perf/optimize-gridview-and-listview
- https://learn.microsoft.com/en-us/windows/apps/design/best-practices
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |