FluentDialogs.Wpf
2.0.0
dotnet add package FluentDialogs.Wpf --version 2.0.0
NuGet\Install-Package FluentDialogs.Wpf -Version 2.0.0
<PackageReference Include="FluentDialogs.Wpf" Version="2.0.0" />
<PackageVersion Include="FluentDialogs.Wpf" Version="2.0.0" />
<PackageReference Include="FluentDialogs.Wpf" />
paket add FluentDialogs.Wpf --version 2.0.0
#r "nuget: FluentDialogs.Wpf, 2.0.0"
#:package FluentDialogs.Wpf@2.0.0
#addin nuget:?package=FluentDialogs.Wpf&version=2.0.0
#tool nuget:?package=FluentDialogs.Wpf&version=2.0.0
FluentDialogs.Wpf
Modern, injectable WPF dialog library with Windows 11 Fluent Design. Replaces System.Windows.MessageBox with async, MVVM-compatible, fully themeable dialogs.
Features
- Async-first — All dialogs are async, no UI blocking
- Dependency Injection — First-class DI support with
IMessageBoxService - MVVM-friendly — Injectable, testable, mockable services
- Fluent Design — Windows 11 styling with light/dark themes and smooth open animation
- Token-based Theming — Three-layer design token system (Primitives → Semantics → Brushes) with runtime switching, accent colors, and custom presets
- Comprehensive — Info, confirm, error, input, selection, dropdown, progress, toast notifications
- Fluent Builder — Chainable API with result callbacks
- Fluent Icons — Composite circle-and-symbol icons matching Windows 11 design language
- Resizable Dialogs — License and custom dialogs support edge-drag resizing
- Extensible — Custom buttons, content, and theming
- Backward Compatible — v1 resource keys still work via built-in compatibility layer
Quick Start
Install
dotnet add package FluentDialogs.Wpf
Setup
// Register services with optional configuration
services.AddFluentDialogs(options =>
{
options.DefaultPreset = MessageBoxTheme.Light; // or .Dark
// options.AccentColor = Colors.Purple; // optional brand color
});
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FluentDialogs.Wpf;component/Themes/FluentDialogs.Theme.xaml"/>
</ResourceDictionary.MergedDictionaries>
Use
public class MainViewModel
{
private readonly IMessageBoxService _messageBox;
private readonly IToastService _toast;
public MainViewModel(IMessageBoxService messageBox, IToastService toast)
{
_messageBox = messageBox;
_toast = toast;
}
public async Task DeleteAsync()
{
var result = await _messageBox.ConfirmAsync("Delete this item?", "Confirm");
if (result == MessageBoxResult.Yes)
{
// Delete item
_toast.ShowSuccess("Item deleted!");
}
}
}
Theme Switching
public class SettingsViewModel
{
private readonly IFluentDialogThemeService _theme;
public SettingsViewModel(IFluentDialogThemeService theme)
{
_theme = theme;
}
public void ToggleDarkMode(bool isDark)
{
_theme.ApplyPreset(isDark ? MessageBoxTheme.Dark : MessageBoxTheme.Light);
}
}
Fluent Builder
await _messageBox.Confirm("Delete item?")
.OnYes(() => DeleteItem())
.OnNo(() => Cancel())
.ShowAsync();
Dropdown Selection
var languages = new[] { "English", "French", "German", "Spanish" };
var result = await _messageBox.DropdownAsync("Select language:", languages, title: "Language");
if (result.Result == MessageBoxResult.OK)
{
string selected = result.DropdownSelectedItem as string;
}
Services
| Service | Description |
|---|---|
IMessageBoxService |
Modal dialogs (info, confirm, error, input, selection, dropdown, progress) |
IToastService |
Non-blocking toast notifications |
IFluentDialogThemeService |
v2 theme management — presets, tokens, accent color |
IMessageBoxThemeService |
Legacy v1 theme service (still works via adapter) |
Theming Architecture
FluentDialogs uses a three-layer design token system:
Primitives (_Primitives.xaml) — Raw color palette (never referenced by controls)
↓
Semantics (_Semantics.xaml) — Meaning-based aliases (THE customization layer)
↓
Brushes (_Brushes.xaml) — SolidColorBrush resources consumed by control styles
Override semantic tokens to customize every dialog without touching control templates. See the Theming Guide for full details.
Avoiding Namespace Conflicts
Use Fluent-prefixed aliases to avoid conflicts with System.Windows:
using FluentDialogs.Models;
var options = new FluentMessageBoxOptions { /* ... */ };
FluentDialogResult result = await _messageBox.ShowExtendedAsync(options);
Documentation
- Getting Started
- API Reference
- Dialogs Guide
- Progress Dialogs
- Toast Notifications
- Theming Guide
- Fluent Builder
Screenshots
Light Theme
Dark Theme
Requirements
- .NET 9.0+
- Windows Desktop Runtime
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0-windows7.0 is compatible. net10.0-windows was computed. |
-
net9.0-windows7.0
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v2.0.0 — Theming Engine & Fluent Design Overhaul
New Features:
• Custom Theming Engine — IFluentDialogThemeService with 30+ semantic tokens, custom XAML presets, accent colors, and runtime token overrides
• Windows 11 Fluent Design Icons — Composite DrawingGroup icons (filled circle + white symbol)
• Dropdown Dialogs — DropdownAsync<T> for combobox-style selection
• Resizable Dialogs — IsResizable option for license/content dialogs
• Fluent Builder Extensions — WithDropdown<T>, WithResizable
• Custom Presets — Load brand-specific XAML presets at runtime (ApplyCustomPreset)
• Accent Color API — SetAccentColor with auto-derived hover/pressed states
• PresetChanged Event — Subscribe to theme switch notifications
Breaking Changes:
• Theming architecture fully reworked (v1 compat layer included via LegacyThemeServiceAdapter)
• New service registration: services.AddFluentDialogs() now registers IFluentDialogThemeService
Full Changelog: https://github.com/LongKelvin/FluentDialogs.Wpf/compare/v1.1.0...v2.0.0