CCSWE.Avalonia.Theme 0.1.10

Suggested Alternatives

CCSWE.Avalonia.Material

Additional Details

Renamed to CCSWE.Avalonia.Material

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package CCSWE.Avalonia.Theme --version 0.1.10
                    
NuGet\Install-Package CCSWE.Avalonia.Theme -Version 0.1.10
                    
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="CCSWE.Avalonia.Theme" Version="0.1.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CCSWE.Avalonia.Theme" Version="0.1.10" />
                    
Directory.Packages.props
<PackageReference Include="CCSWE.Avalonia.Theme" />
                    
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 CCSWE.Avalonia.Theme --version 0.1.10
                    
#r "nuget: CCSWE.Avalonia.Theme, 0.1.10"
                    
#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 CCSWE.Avalonia.Theme@0.1.10
                    
#: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=CCSWE.Avalonia.Theme&version=0.1.10
                    
Install as a Cake Addin
#tool nuget:?package=CCSWE.Avalonia.Theme&version=0.1.10
                    
Install as a Cake Tool

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>
  1. <FluentTheme /> supplies the control templates this theme doesn't override.
  2. Theme.axaml layers the tokens, type scale, motion, and M3 control themes on top.
  3. 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: Border with Card + 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 … LabelSmall as TextBlock classes.
  • Color roles: {DynamicResource Primary} (brush) / {DynamicResource PrimaryColor} (color). Use DynamicResource for 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 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. 
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