Xaml.ExtensionPack
A lightweight, dependency-free XAML extension library for WPF. Provides essential MVVM foundations as a NuGet package.
Overview
Xaml.ExtensionPack is a NuGet library designed to eliminate boilerplate in WPF/XAML application development.
- Xaml.ExtensionPack — A framework-agnostic core library providing foundational MVVM logic. Targets .NET 10, .NET 8, and .NET Framework 4.7.2.
Background: Cutting Boilerplate Without Heavyweight Dependencies
WPF applications built with the MVVM pattern tend to accumulate repetitive infrastructure code:
INotifyPropertyChanged implementations, ICommand wrappers, and async-safe fire-and-forget helpers.
While community toolkits exist, they often pull in large dependency trees or enforce architectural conventions beyond what a project needs.
Xaml.ExtensionPack was created to provide only what is genuinely necessary — a small, focused set of utilities that integrate cleanly into any WPF project without extra overhead.
What's Included
-
BindableBase — Abstract base class implementing
INotifyPropertyChanged. ProvidesSetPropertyhelpers (with optional callback) and lambda-basedOnPropertyChangedfor refactoring-safe notifications. -
RelayCommand / RelayCommand<T> — Lightweight
ICommandimplementations that delegate execution logic via delegates. Support optionalCanExecutepredicates and exposeRaiseCanExecuteChangedvia theIRaiseCanExecuteChangedinterface. -
AsyncRelayCommand — An async-aware
ICommandthat prevents concurrent execution and automatically updatesCanExecutewhile a task is running. -
TaskExtensions.FireAndForget — A safe fire-and-forget extension method for
Taskthat accepts an optional exception handler, avoiding unobserved task exceptions.
Technology Stack
- Language: C# (latest)
- Target Frameworks: .NET 10, .NET 8, .NET Framework 4.7.2
- License: MIT
Repository
Source code and issue tracking are available on GitHub: