![]() |
VOOZH | about |
dotnet add package Projektanker.Icons.Avalonia --version 9.6.2
NuGet\Install-Package Projektanker.Icons.Avalonia -Version 9.6.2
<PackageReference Include="Projektanker.Icons.Avalonia" Version="9.6.2" />
<PackageVersion Include="Projektanker.Icons.Avalonia" Version="9.6.2" />Directory.Packages.props
<PackageReference Include="Projektanker.Icons.Avalonia" />Project file
paket add Projektanker.Icons.Avalonia --version 9.6.2
#r "nuget: Projektanker.Icons.Avalonia, 9.6.2"
#:package Projektanker.Icons.Avalonia@9.6.2
#addin nuget:?package=Projektanker.Icons.Avalonia&version=9.6.2Install as a Cake Addin
#tool nuget:?package=Projektanker.Icons.Avalonia&version=9.6.2Install as a Cake Tool
A library to easily display icons in an Avalonia App.
👁 🚀 Push
👁 🔄 Sync Fontawesome
👁 🔄 Sync Material Design
| Name | Description | Version |
|---|---|---|
| Projektanker.Icons.Avalonia | Core library | 👁 Nuget |
| Projektanker.Icons.Avalonia.FontAwesome | Font Awesome 6 Free | 👁 Nuget |
| Projektanker.Icons.Avalonia.MaterialDesign | Material Design Icons | 👁 Nuget |
| Name | Prefix | Example |
|---|---|---|
| FontAwesome 6 | fa |
fa-github |
| MaterialDesign | mdi |
mdi-github |
A full example is available in the .
Register the icon provider(s) with the IconProvider.Current.
class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
public static void Main(string[] args)
{
BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);
}
// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
{
IconProvider.Current
.Register<FontAwesomeIconProvider>()
.Register<MaterialDesignIconProvider>();
return AppBuilder.Configure<App>()
.UsePlatformDetect()
.LogToTrace();
}
}
Add xmlns:i="https://github.com/projektanker/icons.avalonia" to your view.
Standalone
<i:Icon Value="fa-brands fa-anchor" />
Attached to ContentControl (e.g. Button)
<Button i:Attached.Icon="fa-brands fa-anchor" />
Attached to MenuItem
<MenuItem Header="About" i:MenuItem.Icon="fa-solid fa-circle-info" />
Custom icon size
<i:Icon Value="fa-brands fa-anchor" FontSize="24" />
Animated
<i:Icon Value="fa-spinner" Animation="Pulse" />
<i:Icon Value="fa-sync" Animation="Spin" />
As an Image source
<Image>
<Image.Source>
<i:IconImage Value="fa-brands fa-anchor" Brush="(defaults to black)" />
</Image.Source>
</Image>
Just implement the IIconProvider interface:
namespace Projektanker.Icons.Avalonia
{
/// <summary>
/// Represents an icon reader.
/// </summary>
public interface IIconReader
{
/// <summary>
/// Gets the model of the requested icon.
/// </summary>
/// <param name="value">The value specifying the icon to return it's model from.</param>
/// <returns>The model of the icon.</returns>
/// <exception cref="System.Collections.Generic.KeyNotFoundException">
/// The icon associated with the specified <paramref name="value"/> does not exists.
/// </exception>
IconModel GetIcon(string value);
}
/// <summary>
/// Represents an icon provider.
/// </summary>
public interface IIconProvider : IIconReader
{
/// <summary>
/// Gets the prefix of the <see cref="IIconProvider"/>.
/// </summary>
string Prefix { get; }
}
}
and register it with the IIconProviderContainer:
IconProvider.Current.Register<MyCustomIconProvider>()
or
IIconProvider provider = new MyCustomIconProvider(/* custom ctor arguments */);
IconProvider.Current.Register(provider);
The IIconProvider.Prefix property has to be unique within all registered providers. It is used to select the right provider. E.g. FontAwesomeIconProvider's prefix is fa.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 4 NuGet packages that depend on Projektanker.Icons.Avalonia:
| Package | Downloads |
|---|---|
|
Projektanker.Icons.Avalonia.FontAwesome
A library to easily display FontAwesome icons in an Avalonia App. |
|
|
Projektanker.Icons.Avalonia.MaterialDesign
A library to easily display Material Design icons in an Avalonia App. |
|
|
Zafiro.Avalonia.Icons.Projektanker
UI components, controls, dialogs, behaviors, and helpers for Avalonia applications. Includes reactive patterns, cross-platform support (desktop, mobile, browser), and source generators. |
|
|
MenuFactory
Simple Avalonia library to help manage the application menu |
Showing the top 11 popular GitHub repositories that depend on Projektanker.Icons.Avalonia:
| Repository | Stars |
|---|---|
|
fifty-six/Scarab
An installer for Hollow Knight mods written with Avalonia.
|
|
|
BAndysc/WoWDatabaseEditor
Integrated development environment (IDE), an editor for Smart Scripts (SAI/smart_scripts) for TrinityCore based servers. Cmangos support work in progress. Featuring a 3D view built with OpenGL and custom ECS framework
|
|
|
schneidermanuel/TwitchLeecher-Dx
Twitch Leecher DX - The Broadcast Downloader
|
|
|
Floogen/Stardrop
Stardrop is an open-source, cross-platform mod manager for the game Stardew Valley.
|
|
|
AvaloniaInside/Shell
Reduces the complexity of mobile/desktop application development by providing the fundamental features that most applications require
|
|
|
Ombrelin/plex-rich-presence
A desktop app to enable discord rich presence for your Plex Media Server Activity
|
|
|
BlossomiShymae/Needlework.Net
🪡 A .NET helper development tool for the LCU and Game Client!
|
|
|
huaisha1224/StardewValleyMODManager
中文版星露谷物语MOD安装器,An installer for StardewValley mods for Chinese
|
|
|
hailstorm75/ModularDoc
Modular documentation generator for .NET libraries. Currently supporting Markdown only for GitHub, GitLab, and Bitbucket
|
|
|
TKMM-Team/Tkmm
TotK Mod Manager, a mod manager and merger for Tears of the Kingdom
|
|
| niksedk/subtitleedit-avalonia |
| Version | Downloads | Last Updated |
|---|---|---|
| 9.6.2 | 97,635 | 5/7/2025 |
| 9.6.1 | 25,296 | 2/18/2025 |
| 9.6.0 | 9,651 | 12/22/2024 |
| 9.5.0 | 4,943 | 11/24/2024 |
| 9.4.3 | 8,307 | 11/18/2024 |
| 9.4.2 | 844 | 11/18/2024 |
| 9.4.1 | 23,509 | 10/4/2024 |
| 9.4.0 | 89,700 | 7/21/2024 |
| 9.3.0 | 30,996 | 4/7/2024 |
| 9.2.0 | 1,715 | 3/29/2024 |
| 9.1.2 | 7,851 | 3/12/2024 |
| 9.1.1 | 7,613 | 2/22/2024 |
| 9.0.1 | 12,948 | 12/8/2023 |
| 9.0.0 | 1,365 | 12/6/2023 |
| 8.4.0 | 2,557 | 12/6/2023 |
| 8.3.0 | 10,176 | 10/11/2023 |
| 8.2.0 | 5,213 | 8/6/2023 |
| 8.1.0 | 1,364 | 7/26/2023 |
| 8.0.0 | 1,497 | 7/17/2023 |
| 7.0.1 | 1,489 | 7/16/2023 |