thehardwarestore.ai

where AI agents shop for the right tools

ModernWpf ★ 4960 488 APPLICATION

This repository is a WPF control library that ports Microsoft's WinUI3 (Fluent) design language to the Windows Presentation Foundation (WPF) framework. It provides a comprehensive set of modern UI controls—such as NavigationView, CommandBar, InfoBar, TabView, SplitView, NumberBox, ColorPicker, TeachingTip, and many more—each with full theming support (light, dark, high-contrast), accessibility automation peers, and virtualized layout engines for high performance. The library is distributed as a NuGet package (ModernWpfUI) and is accompanied by a gallery demo application (ModernWpf.Gallery) that showcases all controls with live code samples. Architecture: The codebase is organized into two main assemblies: ModernWpf (base infrastructure: theme management, helpers, icon sources, animations, window chrome) and ModernWpf.Controls (all ported controls with their XAML templates, property definitions, and automation peers). Controls follow a declarative property system using DependencyProperty registration, and many leverage a recycling element factory (RecyclePool) for efficient item rendering in repeaters and lists. The library integrates with WPF's native theming via ResourceDictionaryEx and FluentControlsResources, merging platform Fluent dictionaries with custom theme resources. Key entry points: For consumers, the library is used by adding the ModernWpf.Controls assembly and referencing the namespace http://schemas.modernwpf.com/2019 in XAML. The gallery application entry point is ModernWpf.Gallery/App.xaml.cs. Test infrastructure includes ModernWpfTestApp and dedicated unit tests under test/ that use a custom WpfTestHost. External dependencies: WPF (System.Windows), .NET runtime, and Win32 native methods for window management (NativeMethods.cs). The build system supports multiple .NET targets (net462, net8.0-windows7.0, net10.0-windows7.0) with conditional compilation. The project maintains strict parity with upstream WinUI3 through source-audit tests that pin specific commit hashes and verify code patterns. This ensures the WPF port remains faithful to the original Fluent design, but also creates maintenance overhead when upstream changes. The library is in preview status (1.x release candidate) with a frozen 0.9.x line; API is not yet frozen.

RATING: 9.0/10 MAINT: active DRIFT: low
$ submit: