WPFBase - Modern WPF MVVM Framework
π Quick Start
A production-ready WPF MVVM framework built with modern .NET practices and comprehensive architecture patterns.
β¨ Key Features
Modern MVVM
Built with CommunityToolkit.Mvvm 8.4.0 source generators for automatic property and command generation. No more boilerplate code!
Source Generators
ObservableProperty
RelayCommand
Rich Architecture
Comprehensive service layer with dependency injection, navigation, dialogs, themes, and docking windows.
Dependency Injection
AvalonDock
Service Layer
Professional UI
Visual Studio-style docking, light/dark themes, custom controls, and modern design patterns.
Dark Mode
Docking Windows
Custom Controls
Validation Ready
Built-in support for both DataAnnotations and FluentValidation with automatic error handling.
DataAnnotations
FluentValidation
Error Handling
Test Coverage
Comprehensive unit tests with xUnit and Moq. CI/CD pipeline with automated testing.
xUnit
Moq
GitHub Actions
Documentation
Complete documentation with step-by-step guides, examples, and best practices.
Getting Started
API Reference
Examples
ποΈ Core Technologies
| Technology | Version | Purpose |
|---|---|---|
| .NET | 9.0 | Modern C# with latest features |
| CommunityToolkit.Mvvm | 8.4.0 | Source generators for MVVM |
| AvalonDock | 4.72.1 | VS-style docking windows |
| Serilog | 4.1.0 | Structured logging |
| FluentValidation | 11.10.0 | Business rule validation |
| Microsoft.Extensions.DI | 9.0.0 | Dependency injection |
π― Perfect For
- Enterprise Desktop Applications - Professional business apps
- Document-Based Applications - With docking and tabbed interfaces
- Configuration Tools - Settings and admin utilities
- Data Management Apps - CRUD operations with validation
- Rapid Prototyping - Production-ready code from day one
π» Quick Example
Hereβs how easy it is to create a feature with WPFBase:
public partial class CustomerViewModel : ViewModelBase
{
private readonly ICustomerService _customerService;
private readonly IDialogService _dialogService;
[ObservableProperty]
private string name = string.Empty;
[ObservableProperty]
private ObservableCollection<Customer> customers = new();
public CustomerViewModel(ICustomerService customerService, IDialogService dialogService)
{
_customerService = customerService;
_dialogService = dialogService;
Title = "Customer Management";
}
[RelayCommand]
private async Task LoadCustomersAsync()
{
IsBusy = true;
try
{
var data = await _customerService.GetAllAsync();
Customers.Clear();
foreach (var item in data) Customers.Add(item);
}
catch (Exception ex)
{
await _dialogService.ShowErrorAsync("Failed to load customers", "Error", ex);
}
finally
{
IsBusy = false;
}
}
}
π Next Steps
π€ Community
- GitHub Repository - Source code, issues, and releases
- Discussions - Community Q&A and ideas
- Contributing Guide - How to contribute
- Issues - Bug reports and feature requests
| Built with β€οΈ for the WPF community | MIT License | Version 1.0.0 |