Skip to content

BumpyClock/agent-templates / skills_archive/winui3-csharp-app

winui3-csharp-app

Verified

WinUI 3 / Windows App SDK desktop apps in C#/XAML. MVVM, bindings, navigation, Mica/Acrylic, windowing, packaging, performance.

FileKindSize
SKILL.mdskill md2.1 KB
agents/openai.yamlconfig176 B
references/design-fluent.mdmarkdown1.4 KB
references/foundations.mdmarkdown3.2 KB
references/performance.mdmarkdown1.9 KB
references/ui-ux.mdmarkdown3.4 KB
references/windowing.mdmarkdown2.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
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: 196kUpdated Claude CodeCodexVerifiedInstall
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: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 193kUpdated Claude CodeCodexVerifiedInstall
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: 193kUpdated Claude CodeCodexVerifiedInstall