AvaloniaSkinManager 2.0.1

dotnet add package AvaloniaSkinManager --version 2.0.1
                    
NuGet\Install-Package AvaloniaSkinManager -Version 2.0.1
                    
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="AvaloniaSkinManager" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AvaloniaSkinManager" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="AvaloniaSkinManager" />
                    
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 AvaloniaSkinManager --version 2.0.1
                    
#r "nuget: AvaloniaSkinManager, 2.0.1"
                    
#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 AvaloniaSkinManager@2.0.1
                    
#: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=AvaloniaSkinManager&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=AvaloniaSkinManager&version=2.0.1
                    
Install as a Cake Tool

AvaloniaThemeManager

Theme management library for Avalonia UI applications with built-in themes, runtime theme switching, import/export, validation, and ready-made theme UI components.

NuGet Version NuGet Downloads License: MIT

Package

Install the published package:

dotnet add package AvaloniaSkinManager

What it provides

  • 12 built-in themes, including Dark, Light, Ocean Blue, ModernIce, RetroTerminal, and Material Design 3
  • runtime theme switching through ISkinManager
  • saved-theme restoration during app startup
  • theme import/export and theme-pack export helpers
  • validation and auto-fix services for custom themes
  • ready-to-use UI components:
    • QuickThemeSwitcher
    • ThemeSettingsDialog
    • ThemeManagerDemoView

Quick start

1. Configure the app

using Avalonia;
using Avalonia.ReactiveUI;
using AvaloniaThemeManager.Extensions;

public static AppBuilder BuildAvaloniaApp()
    => AppBuilder.Configure<App>()
        .UsePlatformDetect()
        .UseThemeManager()
        .WithInterFont()
        .UseReactiveUI();

2. Merge the library theme resources

<Application
    x:Class="YourApp.App"
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceInclude Source="avares://AvaloniaThemeManager/Themes/CustomThemes.axaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>

    <Application.Styles>
        <FluentTheme />
    </Application.Styles>
</Application>

3. Resolve and use ISkinManager

using AvaloniaThemeManager.Extensions;
using AvaloniaThemeManager.Theme;

var skinManager = AppBuilderExtensions.GetRequiredService<ISkinManager>();

skinManager.ApplySkin("Dark");
var availableThemes = skinManager.GetAvailableSkinNames();

DI-friendly usage

The library now prefers explicit dependency injection. Compatibility constructors still exist on a few UI types, but new code should pass dependencies explicitly.

Open the theme settings dialog

using AvaloniaThemeManager.Theme;
using AvaloniaThemeManager.Views;
using Microsoft.Extensions.Logging.Abstractions;

var skinManager = AppBuilderExtensions.GetRequiredService<ISkinManager>();
var dialog = new ThemeSettingsDialog(skinManager, NullLogger.Instance);
await dialog.ShowDialog(this);

Use the quick switcher

<UserControl
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="clr-namespace:AvaloniaThemeManager.Controls;assembly=AvaloniaThemeManager">
    <controls:QuickThemeSwitcher />
</UserControl>

Use the demo view

using AvaloniaThemeManager.Services.Interfaces;
using AvaloniaThemeManager.Theme;
using AvaloniaThemeManager.Views;
using Microsoft.Extensions.Logging.Abstractions;

var skinManager = AppBuilderExtensions.GetRequiredService<ISkinManager>();
var dialogService = AppBuilderExtensions.GetRequiredService<IDialogService>();

var demoView = new ThemeManagerDemoView(
    skinManager,
    NullLogger.Instance,
    dialogService);

Import, export, and validation

using AvaloniaThemeManager.Theme;

var skinManager = AppBuilderExtensions.GetRequiredService<ISkinManager>();
var validator = AppBuilderExtensions.GetRequiredService<IThemeValidator>();

var currentSkin = skinManager.CurrentSkin;
var validation = validator.ValidateTheme(currentSkin!);

if (validation.IsValid)
{
    await ThemeImportExport.ExportThemeAsync(currentSkin!, "theme.json");
}

The default export path now writes the full runtime theme model, including typography and control/style URI metadata.

Custom themes

using Avalonia.Media;
using AvaloniaThemeManager.Theme;

var customTheme = new Skin
{
    Name = "My Theme",
    PrimaryColor = Color.Parse("#343B48"),
    SecondaryColor = Color.Parse("#3D4654"),
    AccentColor = Color.Parse("#3498DB"),
    PrimaryBackground = Color.Parse("#2C313D"),
    SecondaryBackground = Color.Parse("#464F62"),
    PrimaryTextColor = Color.Parse("#FFFFFF"),
    SecondaryTextColor = Color.Parse("#CCCCCC"),
    BorderColor = Color.Parse("#5D6778"),
    ErrorColor = Color.Parse("#E74C3C"),
    WarningColor = Color.Parse("#F39C12"),
    SuccessColor = Color.Parse("#2ECC71")
};

var skinManager = AppBuilderExtensions.GetRequiredService<ISkinManager>();
skinManager.RegisterSkin(customTheme.Name, customTheme);
skinManager.ApplySkin(customTheme.Name);

Public services

  • ISkinManager
  • IThemeValidator
  • IThemeAutoFixer
  • IThemeLoaderService
  • IDialogService
  • ThemeInheritanceManager

Notes

  • The package ID is AvaloniaSkinManager.
  • The library namespace remains AvaloniaThemeManager.
  • Startup initialization restores the last saved theme when UseThemeManager() is used.
  • Demo and compatibility constructors are still present, but new code should prefer explicit constructors and resolved services.

Changelog

2.0.1

  • moved the library to a DI-first model
  • removed the old SkinManager.Instance singleton path
  • fixed full-fidelity theme import/export
  • fixed inheritable theme resolution for typography and URI overrides
  • unified validation policy and split validation from autofix
  • reduced demo app and demo view orchestration code-behind

Support

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  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.1 101 4/13/2026
2.0.0 101 4/13/2026
1.0.4 267 6/4/2025
1.0.3 242 6/2/2025
1.0.2 217 6/2/2025
1.0.1 211 6/1/2025

Breaking release: migrated to a DI-first API, removed SkinManager singleton access, fixed full-fidelity theme import/export and inheritable typography or URI resolution, unified validation and autofix behavior, and hardened demo plus dialog coverage.