FluentDialogs.Wpf 2.0.0

dotnet add package FluentDialogs.Wpf --version 2.0.0
                    
NuGet\Install-Package FluentDialogs.Wpf -Version 2.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FluentDialogs.Wpf" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FluentDialogs.Wpf" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="FluentDialogs.Wpf" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FluentDialogs.Wpf --version 2.0.0
                    
#r "nuget: FluentDialogs.Wpf, 2.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FluentDialogs.Wpf@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FluentDialogs.Wpf&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=FluentDialogs.Wpf&version=2.0.0
                    
Install as a Cake Tool

FluentDialogs.Wpf

Modern, injectable WPF dialog library with Windows 11 Fluent Design. Replaces System.Windows.MessageBox with async, MVVM-compatible, fully themeable dialogs.

NuGet License

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();
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

Screenshots

Light Theme

Light Theme

Dark Theme

Dark Theme

Requirements

  • .NET 9.0+
  • Windows Desktop Runtime

License

MIT

Product Compatible and additional computed target framework versions.
.NET net9.0-windows7.0 is compatible.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 89 2/27/2026
1.1.0 101 2/6/2026
1.0.0 94 2/5/2026

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