A new WPF topic rule covers accessibility (AutomationProperties names and help text, keyboard access, visible focus, high contrast through SystemColors, automation peers for custom controls), DPI scaling in device-independent units with tests across scale factors and monitors, and the Fluent theme through ThemeMode on .NET 9 and later. The existing WPF rules lose about a quarter of their size by merging one-line generic bullets that the C# and shared rules already cover, while keeping the WPF-specific pitfalls. Duplicate async void and binding error guidance is merged, client secret handling defers to the client app security rule, the architecture rule asks to check .NET Framework versus .NET before using newer APIs, and the CommunityToolkit note states that partial properties require C# 14. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.2 KiB
1.2 KiB
WPF Rules
For WPF, XAML, or MVVM work, open only the focused topic rules relevant to the change. WPF code is C#: load the matching C# topic rules (rules/csharp/index.md / rules-csharp) for language, async, and API guidance, and the shared security rules (rules/security/index.md / rules-security) for security-relevant changes.
| Topic | Codex rule | Claude skill |
|---|---|---|
| MVVM and binding | references/mvvm-and-binding.md |
rules-wpf-mvvm-and-binding |
| Commands, async, and threading | references/commands-and-async.md |
rules-wpf-commands-and-async |
| Collections and XAML | references/collections-and-xaml.md |
rules-wpf-collections-and-xaml |
| Resources and lifecycle | references/resources-and-lifecycle.md |
rules-wpf-resources-and-lifecycle |
| Security, errors, logging, and validation | references/security-and-errors.md |
rules-wpf-security-and-errors |
| Architecture, dependency injection, testing, and performance | references/architecture-and-quality.md |
rules-wpf-architecture-and-quality |
| Accessibility, DPI scaling, and theming | references/accessibility-and-theming.md |
rules-wpf-accessibility-and-theming |