ShellIcons.Avalonia
0.2.0-alpha
dotnet add package ShellIcons.Avalonia --version 0.2.0-alpha
NuGet\Install-Package ShellIcons.Avalonia -Version 0.2.0-alpha
<PackageReference Include="ShellIcons.Avalonia" Version="0.2.0-alpha" />
<PackageVersion Include="ShellIcons.Avalonia" Version="0.2.0-alpha" />
<PackageReference Include="ShellIcons.Avalonia" />
paket add ShellIcons.Avalonia --version 0.2.0-alpha
#r "nuget: ShellIcons.Avalonia, 0.2.0-alpha"
#:package ShellIcons.Avalonia@0.2.0-alpha
#addin nuget:?package=ShellIcons.Avalonia&version=0.2.0-alpha&prerelease
#tool nuget:?package=ShellIcons.Avalonia&version=0.2.0-alpha&prerelease
ShellIcons.Avalonia (preview)
Lucide-derived icons for Avalonia, from the same 1,555-icon catalog as ShellIcons.Blazor and
ShellIcons.Maui. Docs: shellicons.shellui.dev/docs/avalonia/getting-started.
Install
dotnet add package ShellIcons.Avalonia --prerelease
Targets net8.0 and Avalonia 12.1.
Use
<Window xmlns:icons="https://shellicons.dev/avalonia">
<StackPanel Orientation="Horizontal" Spacing="8">
<icons:ChevronRight Size="16" />
<icons:Icon Kind="Search" Foreground="Crimson" />
<icons:Icon Kind="{Binding StatusIcon}" Title="Status" />
</StackPanel>
</Window>
| Property | Default | Notes |
|---|---|---|
Size |
24 |
Width and height |
StrokeThickness |
2 |
On the 24-unit grid, scaled with Size like the other targets |
AbsoluteStroke |
false |
Keep the rendered stroke at StrokeThickness at any size |
Foreground |
inherited | The same inherited property text uses, so an icon in a Button takes the button's foreground |
Title |
null |
Sets AutomationProperties.Name; null keeps the icon out of the accessibility tree |
Names and metadata are the same API as the MAUI package:
IconCatalog.TryParse("home", out var name); // → IconName.House (Lucide alias)
IconCatalog.Get(IconName.House).Tags; // ["home", "living", "building", …]
IconCatalog.Search("cart"); // id matches first, then aliases/tags/categories
Differences from ShellIcons.Maui
| MAUI | Avalonia | Why | |
|---|---|---|---|
| Dispatcher property | Name |
Kind |
Avalonia's Name is already the element name (x:Name) |
| Color | Color (a Color) |
Foreground (a brush, inherited) |
Avalonia has an inherited foreground, so icons follow text color the way currentColor does in Blazor |
| Hit testing | InputTransparent |
IsHitTestVisible="False" |
Each framework's own property; same behavior |
IconName, IconCatalog, IconInfo, Size, StrokeThickness, AbsoluteStroke and Title are identical.
How it draws
ShellIcons.Generator.Xaml converts each SVG at build time into one normalized path string
(M L C Q A Z, absolute coordinates) — the same conversion and the same data the MAUI package uses.
Avalonia parses that grammar natively, so the control turns it into a StreamGeometry once per icon,
caches it, and draws it in Render under a scale transform. There are no child controls: an icon is
one visual.
Design decisions
| Decision | Why |
|---|---|
Custom-drawn Control, not a Path inside a template |
One visual per icon, no template to apply, no layout pass for children. Lists and toolbars show many icons. |
Foreground added from TextElement.ForegroundProperty |
It inherits, so icons match surrounding text without a style. |
Kind for the dispatcher |
Name is taken; Kind is what Avalonia icon libraries already use. |
Shared generator with MAUI, picked by <ShellIconsTarget> |
One catalog reader and one emitter, so the two XAML packages can't drift apart. |
Verified
- Builds with zero warnings; part of
ShellIcons.slnx, so it needs no extra workloads. - 34 headless tests that render through Skia: every icon parses, stays on the 24×24 grid and draws ink inside its own cell; size, stroke, color, XAML namespace and accessibility are checked from real pixels or the real property system. One test checks the 110 icon names ShellUI Native uses.
- Installed from the packed package into a fresh
dotnet new avalonia.appon Windows: icons render in a desktop window, aDynamicResourcebrush recolors them, and a click on an icon inside aButtonreaches the button. Not yet looked at on macOS or Linux.
| Product | Versions 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. |
-
net8.0
- Avalonia (>= 12.1.3)
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 |
|---|---|---|
| 0.2.0-alpha | 58 | 10/23/2026 |