How dingpingzhang/wpfextensions works
Project type and purpose
• This is an open-source toolkit of reusable WPF/XAML extensions and MVVM helper libraries.
• It consists of three distinct NuGet-packaged modules:
• WpfExtensions.Xaml – a collection of XAML MarkupExtension classes (CommandExtension, ComposeExtension, IfExtension, SwitchExtension, I18nExtension, etc.)
• WpfExtensions.Binding – a Vue-3-style reactivity engine (Watch, WatchDeep, Computed) for INotifyPropertyChanged/INotifyCollectionChanged objects
• WpfExtensions.Infrastructure – assorted MVVM‐and‐general utilities (RelayCommand, async locking, DI interfaces, logging, configuration, extension methods)
• There is also a Tests project covering the Binding module’s behavior.
File structure
• Top-level solution contains:
• Three library projects under WpfExtensions.*
• A Tests directory targeting WpfExtensions.Binding
• Each library project has its own .csproj, source files grouped by feature folders (e.g. Converters, Commands, Mvvm).
• No executable front-end; these are framework-level components.
Extract insights from the README
• It confirms the three modules and describes key features of each.
• Emphasizes that these are syntactic-sugar supplements for WPF MVVM and should also work on other XAML platforms.
• No runtime orchestration or microservices – purely class libraries.
• Consumer Application (any WPF/UWP/Maui app)
• WpfExtensions.Xaml module
• WpfExtensions.Binding module
• WpfExtensions.Infrastructure module
• .NET / WPF Runtime (presentation layer, XAML parser)
• Unit Tests (tests/Binding)
• Consumer App ↔ XAML parser (loads views, invokes MarkupExtensions)
• XAML parser → WpfExtensions.Xaml (resolves markup extensions to CLR objects)
• ViewModels in Consumer App → WpfExtensions.Binding (Computed, Watch, WatchDeep subscribe to INotifyPropertyChanged)
• Consumer App → WpfExtensions.Infrastructure (uses RelayCommand, DI interfaces, logging, extension methods)
• WpfExtensions.* modules may reference each other (Infrastructure is used by Xaml and Binding modules for shared utilities)
• Unit Tests → WpfExtensions.Binding (validate reactivity behaviors)
c. Architectural patterns & principles
• Layered libraries: separation of concerns between XAML, reactivity, and general utilities
• Observer pattern: INotifyPropertyChanged for reactivity
• Command pattern: RelayCommand and CommandExtension
• Extension methods and MarkupExtension patterns to augment the WPF framework without modifying it
• MVVM supportive interfaces (IViewLoadedAndUnloadedAware, ITabItemSelectionChangedAware)
d. Key technologies/frameworks
• .NET Standard / .NET 5+ (class libraries)
• WPF Presentation Framework, XAML MarkupExtension base class
• INotifyPropertyChanged / INotifyCollectionChanged
• MVVM conventions (commands, view‐model resolution, tab control helpers)
• Unit testing via xUnit/NUnit (Tests project)
Detailed yet focused
• Every public-facing submodule is represented (Markup, Commands, Reactivity, MVVM, Logging, Async)
• Don’t dive into individual classes beyond grouping; concentrate on module boundaries and interactions