Majorsilence.Forms.Theming.Avalonia 26.11.9

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

Majorsilence.Forms.Theming.Avalonia

Applies a Majorsilence.Forms CSS theme to native Avalonia controls (Fluent theme), so an app that mixes Avalonia views with Majorsilence.Forms surfaces — or an Avalonia shell next to a WinForms client themed by Majorsilence.Forms.Theming.WinForms — is themed from one stylesheet: same tokens, same selectors, same diagnostics.

using Majorsilence.Forms.Theming.Avalonia;

// Once the Avalonia Application exists (e.g. in OnFrameworkInitializationCompleted):
AvaloniaCssTheme.Apply (File.ReadAllText ("Themes/brand.css"));   // throws ThemeCssException on errors

// Or keep re-applying while you edit the file:
using var watch = AvaloniaCssTheme.Watch ("Themes/brand.css");

// What could not be expressed on Avalonia (never silently ignored):
foreach (var d in AvaloniaCssTheme.Diagnostics)
    Console.WriteLine (d);

Colours are written as the Fluent theme resources the control themes read (ButtonBackground, ButtonBackgroundPointerOver, TabItemHeaderSelectedPipeFill, the DataGrid selection brushes, ...), so hover and selection states follow; geometry and fonts are setters in a generated Styles. Every token and author variable of the sheet is also published under its PascalCase name (--line2 → {DynamicResource Line2}) for your own views, and the theme variant follows the background.

The property × control support matrix (native / approximate / unsupported) is AvaloniaThemeSupport and is published as docs/theming-avalonia.md.

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 is compatible.  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
26.11.9 52 10/22/2026
26.11.8 72 10/20/2026
26.11.7 84 10/18/2026
26.11.6 84 10/17/2026
26.11.5 89 10/14/2026
26.11.4 85 10/12/2026
26.11.3 90 10/11/2026
26.11.2 83 10/11/2026
26.11.1 93 10/10/2026
26.10.1 94 10/10/2026
26.10.0 84 10/10/2026
26.9.0 89 10/8/2026
26.8.2 91 10/6/2026
26.8.1 93 10/5/2026
26.8.0 109 10/3/2026
26.7.0 95 10/3/2026
26.6.0 100 10/2/2026
26.5.0 92 10/1/2026
26.4.0 99 9/29/2026