CCSWE.Avalonia.Theme
0.1.10
Renamed to CCSWE.Avalonia.Material
dotnet add package CCSWE.Avalonia.Theme --version 0.1.10
NuGet\Install-Package CCSWE.Avalonia.Theme -Version 0.1.10
<PackageReference Include="CCSWE.Avalonia.Theme" Version="0.1.10" />
<PackageVersion Include="CCSWE.Avalonia.Theme" Version="0.1.10" />
<PackageReference Include="CCSWE.Avalonia.Theme" />
paket add CCSWE.Avalonia.Theme --version 0.1.10
#r "nuget: CCSWE.Avalonia.Theme, 0.1.10"
#:package CCSWE.Avalonia.Theme@0.1.10
#addin nuget:?package=CCSWE.Avalonia.Theme&version=0.1.10
#tool nuget:?package=CCSWE.Avalonia.Theme&version=0.1.10
CCSWE.Avalonia.Theme
A branded Material 3 theme for Avalonia 12 — a Dark/Light color system, the M3 type scale, motion, embedded brand fonts, and M3 control themes that give stock Avalonia controls a consistent look.
Install
dotnet add package CCSWE.Avalonia.Theme
Wire it up
Add three things to your App.axaml:
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="YourApp.App"
RequestedThemeVariant="Dark">
<Application.Styles>
<FluentTheme />
<StyleInclude Source="avares://CCSWE.Avalonia.Theme/Theme.axaml" />
</Application.Styles>
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="avares://CCSWE.Avalonia.Theme/FluentOverrides.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
<FluentTheme />supplies the control templates this theme doesn't override.Theme.axamllayers the tokens, type scale, motion, and M3 control themes on top.FluentOverrides.axaml(merged after the styles) remaps Fluent's accent onto the brand so stock controls (Slider, ProgressBar, selection highlights) match.
Use it
<StackPanel Spacing="12">
<TextBlock Classes="HeadlineSmall" Text="Devices" />
<TextBox Classes="Outlined" PlaceholderText="IP address" />
<Button Classes="Filled" Content="Connect" />
<Button Classes="Outlined" Content="Pair new device" />
<CheckBox Content="Connect automatically" />
<ToggleSwitch Content="Wireless debugging" />
</StackPanel>
- Buttons:
Filled,FilledTonal,Elevated,Outlined,Text,Icon. - Text fields:
Outlined,Filled. - Cards:
BorderwithCard+Elevated/Filled/Outlined. - Default-themed (no class):
ToggleButton,AutoCompleteBox,NumericUpDown,CheckBox,RadioButton,ToggleSwitch,ListBox,TreeView,ComboBox,Menu,Expander,Slider,ProgressBar,TabControl,TabStrip. - Type scale:
DisplayLarge … LabelSmallasTextBlockclasses. - Color roles:
{DynamicResource Primary}(brush) /{DynamicResource PrimaryColor}(color). UseDynamicResourcefor role brushes so they re-resolve when the theme variant flips.
Switch theme variant at runtime
Application.Current!.RequestedThemeVariant =
isLight ? ThemeVariant.Light : ThemeVariant.Dark;
License
MIT.
Bundles DM Sans and Plus Jakarta Sans under the
SIL Open Font License 1.1; their OFL.txt files
ship in the package under THIRD-PARTY-NOTICES/.
Source, docs, and the control gallery: https://github.com/CoryCharlton/CCSWE.Avalonia.Theme
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- Avalonia (>= 12.0.4)
- Avalonia.Themes.Fluent (>= 12.0.4)
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 |
|---|