WPFBase - Modern WPF MVVM Framework

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

πŸ’» 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

πŸ“– Read Getting Started Guide πŸ—οΈ Learn Architecture πŸ’‘ See Examples

🀝 Community


Built with ❀️ for the WPF community MIT License Version 1.0.0