FluentAvalonia.FluentIcons 1.1.201

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package FluentAvalonia.FluentIcons --version 1.1.201
NuGet\Install-Package FluentAvalonia.FluentIcons -Version 1.1.201
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="FluentAvalonia.FluentIcons" Version="1.1.201" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FluentAvalonia.FluentIcons --version 1.1.201
#r "nuget: FluentAvalonia.FluentIcons, 1.1.201"
#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.
// Install FluentAvalonia.FluentIcons as a Cake Addin
#addin nuget:?package=FluentAvalonia.FluentIcons&version=1.1.201

// Install FluentAvalonia.FluentIcons as a Cake Tool
#tool nuget:?package=FluentAvalonia.FluentIcons&version=1.1.201

FluentAvalonia.FluentIcons <a href="https://www.nuget.org/packages/FluentAvalonia.FluentIcons"><img alt="Version" src="https://img.shields.io/nuget/v/FluentAvalonia.FluentIcons"/></a> <a href="https://www.nuget.org/packages/FluentAvalonia.FluentIcons"><img src="https://img.shields.io/nuget/dt/FluentAvalonia.FluentIcons" alt="Download count"/></a> <img src="https://img.shields.io/badge/.NET-.NET%20Standard%202.0%20%7C%20.NET%207.0-informational" alt=".NET version"/>

FluentAvalonia.FluentIcons adds support for all Fluent UI System Icons to FluentAvalonia.

This library is compatible with all FluentAvalonia controls.

Usage

Include the namespace in your control.

xmlns:ic="using:FluentAvalonia.FluentIcons"

Example

<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:ic="using:FluentAvalonia.FluentIcons"
        xmlns:ui="using:FluentAvalonia.UI.Controls"
        mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
        x:Class="Avalonia.NETCoreApp1.MainWindow"
        Title="Avalonia.NETCoreApp1">
        
    <ui:NavigationView>
        <ui:NavigationView.MenuItems>
            <ui:NavigationViewItem Content="Page 1">
                <ui:NavigationViewItem.Icon>
                    <ic:FluentIcon Icon="Settings16Filled"/>
                </ui:NavigationViewItem.Icon>
            </ui:NavigationViewItem>

            
            <ui:NavigationViewItem Content="Page 2"
                                   Icon="{ic:FluentIcon Settings16Regular}"/>
        </ui:NavigationView.MenuItems>
    </ui:NavigationView>
</Window>

Rendering

The current approach for rendering icons is to take the glyph from the regular/filled font, extract the SVG path and put it into a PathIcon.

The number in the FluentIconSymbol enum represents the size of the glyph in the font. It doesn't affect how big the icon will be (use the Width and Height properties for that), but it does affect how the icon is scaled, which is visible at lower sizes.

This is how the regular settings icon looks in NavigationView.

image

The resizable font has the same problem, but if an icon looks bad, you can't choose another size, because there's only one.

Using FontIcon is also not a good approach, as the icon is way too small and the scaling is different depending on the operating system. On Windows it looks normal, but on Linux it may look like this:

image

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
1.1.201.1-preview7 427 5/5/2023
1.1.201 430 5/4/2023
1.1.201-preview7 161 5/4/2023