Skip to content

Awesome icon packs for Avalonia in one library. Supporting a wide range of platforms such as Windows, macOS, Linux, iOS, Android and WebAssembly.

License

Notifications You must be signed in to change notification settings

MahApps/IconPacks.Avalonia

Repository files navigation


IconPacks.Avalonia

IconPacks.Avalonia

Awesome icon packs for Avalonia in one library

Supporting a wide range of platforms such as Windows, macOS, Linux, iOS, Android and WebAssembly.

Bluesky X (formerly Twitter) Follow Mastodon Follow Discord
AppVeyor Build (with branch) GitHub Actions Workflow Status

This IconPacks library contains controls, markup extensions and converters to use these awesome icons in a simple way.

The same icons are also available for WPF and UWP at MahApps.Metro.IconPacks which makes your WPF and UWP applications nicer.

Icon collection Version NuGet
Complete IconPacks collection with all Icons in one package 55507
Bootstrap Icons 1.11.3 2050
Boxicons 2.1.4 1634
Circum Icons Free 2.0.2 288
Codicons 0.0.36 461
Coolicons 4.1 442
Entypo+ 411
Eva Icons 1.1.3 490
Feather Icons 4.29.1 287
File Icons 2.1.47 920
Fontaudio 1.1.0 155
Font Awesome Free 6.6.0 2050
Fontisto 3.0.4 616
Fork Awesome 1.2.0 794
Game Icons Apr 7, 2024 4149
Ionicons 4.6.4.1 696
Jam Icons 3.1.0 940
Lucide Icons 0.460.0 1539
Material Design Icons 7.4.47 7447
Material Design Icons Light 0.2.63 257
Material Icons (Google) 4.0.0 8413
Memory Icons 1.5.0 651
Microns 1.1.4 164
Modern UI Icons Feb 12, 2015 1260
Primer Octicons (GitHub) 19.12.0 643
Phosphor Icons 2.1.1 7560
PICOL Icons 1.1.0 549
Pixelarticons 1.8.1 486
Radix Icons 1.3.0 324
Remix Icon 4.5.0 3020
RPG Awesome 0.2.0 495
Simple Icons 13.16.0 3221
Typicons 2.1.2 336
Unicons 4.0.8 1607
Vaadin Icons 24.5.3 636
Weather Icons 2.0.12 219
Zondicons July 12, 2017 297

Let's get started

Install

IconPacks.Avalonia is delivered via NuGet package manager. You can find the packages here:

All Icons in one package

Separate Icon packages

Use these commands in the Package Manager console to install packages manually:

Install-Package IconPacks.Avalonia

or one of these

Install-Package IconPacks.Avalonia.BootstrapIcons
Install-Package IconPacks.Avalonia.BoxIcons
Install-Package IconPacks.Avalonia.CircumIcons
Install-Package IconPacks.Avalonia.Codicons
Install-Package IconPacks.Avalonia.Coolicons
Install-Package IconPacks.Avalonia.Entypo
Install-Package IconPacks.Avalonia.EvaIcons
Install-Package IconPacks.Avalonia.FeatherIcons
Install-Package IconPacks.Avalonia.FileIcons
Install-Package IconPacks.Avalonia.Fontaudio
Install-Package IconPacks.Avalonia.FontAwesome
Install-Package IconPacks.Avalonia.Fontisto
Install-Package IconPacks.Avalonia.ForkAwesome
Install-Package IconPacks.Avalonia.GameIcons
Install-Package IconPacks.Avalonia.Ionicons
Install-Package IconPacks.Avalonia.JamIcons
Install-Package IconPacks.Avalonia.Lucide
Install-Package IconPacks.Avalonia.Material
Install-Package IconPacks.Avalonia.MaterialLight
Install-Package IconPacks.Avalonia.MaterialDesign
Install-Package IconPacks.Avalonia.MemoryIcons
Install-Package IconPacks.Avalonia.Microns
Install-Package IconPacks.Avalonia.Modern
Install-Package IconPacks.Avalonia.Octicons
Install-Package IconPacks.Avalonia.PhosphorIcons
Install-Package IconPacks.Avalonia.PicolIcons
Install-Package IconPacks.Avalonia.PixelartIcons
Install-Package IconPacks.Avalonia.RadixIcons
Install-Package IconPacks.Avalonia.RemixIcon
Install-Package IconPacks.Avalonia.RPGAwesome
Install-Package IconPacks.Avalonia.SimpleIcons
Install-Package IconPacks.Avalonia.Typicons
Install-Package IconPacks.Avalonia.Unicons
Install-Package IconPacks.Avalonia.VaadinIcons
Install-Package IconPacks.Avalonia.WeatherIcons
Install-Package IconPacks.Avalonia.Zondicons

Usage

Use this axaml/xaml namespace for all IconPacks:

xmlns:iconPacks="https://github.com/MahApps/IconPacks.Avalonia"

Add the styles to the Applications styles

    <Application.Styles>
        <FluentTheme />

        <StyleInclude Source="avares://IconPacks.Avalonia/Icons.axaml" />
    </Application.Styles>

avares://IconPacks.Avalonia/Icons.axaml should be used when using the main IconPacks.Avalonia NuGet package.

All other has the naming scheme avares://IconPacks.Avalonia.<PACKAGENAME>/Icons.axaml

The PackIcon controls

The PackIcon controls are the main featured controls to use an icon from an IconPack in a simple way.

Each package has there own control with this name scheme: PackIcon<PACKAGENAME>

<iconPacks:PackIconBoxIcons Kind="RegularAlarm"
                            Width="24"
                            Height="24" />

or

<iconPacks:PackIconCodicons Kind="SaveAll"
                            Width="24"
                            Height="24" />

The PackIconControl

The PackIconControl is a control which can be used for any kind of available IconPacks.

This control is only available with the main IconPacks.Avalonia NuGet package.

<iconPacks:PackIconControl Kind="{x:Static iconPacks:PackIconBoxIconsKind.RegularAlarm}"
                           Width="24"
                           Height="24" />

or

<iconPacks:PackIconControl Kind="{x:Static iconPacks:PackIconCodiconsKind.SaveAll}"
                           Width="24"
                           Height="24" />

The PackIcon MarkupExtensions

A faster way to get an Icon for any ContentControl is to use the PackIcon MarkupExtension.

If you want e.g. a Button with an Icon from the Codicons then you can do this:

<Button Content="{iconPacks:Codicons SaveAll}" />

<!-- or -->

<Button Content="{iconPacks:Codicons Kind=SaveAll}" />

It's also possible to use some properties of the MarkupExtension like this:

<Button Content="{iconPacks:Codicons SaveAll, Width=32, Height=32}" />

There is also a general (generic) MarkupExtension available. With this MarkupExtension you can use any IconPack enumeration.

This MarkupExtension is only available with the main IconPacks.Avalonia NuGet package.

<Button Content="{iconPacks:PackIcon {x:Static iconPacks:PackIconCodiconsKind.SaveAll}, Width=32, Height=32}" />

The PackIcon Image MarkupExtensions

It's possible to use all icons as an Image with the PackIcon image MarkupExtension.

<Image Source="{iconPacks:BoxIconsImage Kind=RegularAtom, Brush=Brown}"
       Width="24" Height="24"
       HorizontalAlignment="Left" Margin="10" />

In addition, there is also a general (generic) MarkupExtension available.

This MarkupExtension is only available with the main IconPacks.Avalonia NuGet package.

<Image Source="{iconPacks:PackIconImage Kind={x:Static iconPacks:PackIconBoxIconsKind.RegularAlarm}, Brush=GreenYellow}"
       Width="24" Height="24"
       HorizontalAlignment="Left" Margin="10" />

The PackIcon ImageConverter

The PackIcon image converters can be used to convert a PackIcon to an Image.

<Image Source="{Binding #BoxIconsKindCombobox.SelectedItem, Mode=OneWay, Converter={iconPacks:PackIconBoxIconsKindToImageConverter Brush=Goldenrod}}"
       Width="24" Height="24"
       HorizontalAlignment="Left" Margin="10" />

In addition, there is also a general (generic) PackIconKindToImageConverter available.

This PackIconKindToImageConverter is only available with the main IconPacks.Avalonia NuGet package.

<Image Source="{Binding #BoxIconsKindCombobox.SelectedItem, Mode=OneWay, Converter={iconPacks:PackIconKindToImageConverter Brush=Goldenrod}}"
       Width="24" Height="24"
       HorizontalAlignment="Left" Margin="10" />

Want to say thanks?

This library is free and can be used in open source and commercial applications.

It's tested, contributed and used by me and many other people... So mainly hit the ⭐ button, that's all. ❤️ 🐿️ ( 💵 or 💶 or ☕ or 🍺 or some other gifts are also being accepted...).

Icons

Please don't forget to give also a ⭐ to all used icon repositories!!!

IconPacks Browser

A Browser for all available Icon packages can be found here.

iconbrowserfinal

About

Awesome icon packs for Avalonia in one library. Supporting a wide range of platforms such as Windows, macOS, Linux, iOS, Android and WebAssembly.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Languages