MVVM, comandi asincroni, nessuna logica nel code-behind, testata in high-DPI.
Constitution — WPF desktop app
Version 1.0.0 · Ratified 2026-11-10
These principles hold for every spec, plan and task of the project. A spec may add rules; it never weakens these.
-
MVVM. Views bind to view models through data binding, and view models know nothing about views. View models use
ObservableObjectand source-generated properties from CommunityToolkit.Mvvm. -
Async commands. Long work runs through
IAsyncRelayCommand, anICommandthat disables itself while it runs.async voidis only allowed in event handlers, and.Resultor.Wait()on the UI thread fails the review. -
No logic in code-behind. Code-behind holds only
InitializeComponentand purely visual concerns such as focus or animation. Any business or data logic there fails the review. -
High-DPI tested. The app manifest declares
PerMonitorV2DPI awareness, icons are vectors, and every window is checked at 100%, 150% and 200% scaling and when moved between monitors. -
Dependency injection and testable view models. Services and view models are registered in a
Microsoft.Extensions.Hostinghost and injected. View models are unit-tested without creating any window. -
Accessible and localizable. Controls have
AutomationProperties.Name, every action works with the keyboard and the app is usable in high contrast themes. Visible strings live in resource files, never in XAML literals.