NicolasRepiquet.FontAwesomeWPF
1.0.0
dotnet add package NicolasRepiquet.FontAwesomeWPF --version 1.0.0
NuGet\Install-Package NicolasRepiquet.FontAwesomeWPF -Version 1.0.0
<PackageReference Include="NicolasRepiquet.FontAwesomeWPF" Version="1.0.0" />
paket add NicolasRepiquet.FontAwesomeWPF --version 1.0.0
#r "nuget: NicolasRepiquet.FontAwesomeWPF, 1.0.0"
// Install NicolasRepiquet.FontAwesomeWPF as a Cake Addin
#addin nuget:?package=NicolasRepiquet.FontAwesomeWPF&version=1.0.0
// Install NicolasRepiquet.FontAwesomeWPF as a Cake Tool
#tool nuget:?package=NicolasRepiquet.FontAwesomeWPF&version=1.0.0
FontAwesomeWPF
Simple library to bring FontAwesome icons in your WPF application.
Font Awesome version : 6.4.0 Free
Usage
Install the nuget package NicolasRepiquet.FontAwesomeWPF.
Add the namespace to your XAML file, and use the Icon control.
<Window
...
xmlns:fa="clr-namespace:FontAwesomeWPF;assembly=FontAwesomeWPF"
...
/>
...
<fa:Icon Source0="{x:Static fa:Solid.Cat}" Brush0="#ffaa00">
How it works
The Icon control contains three optional layers. Each of these layer can be used to show a FontAwesome icon.
The way the layer is shown it controlled by various parameters (replace I with the layer index [0..2]) :
Name | Type | Description |
---|---|---|
IsVisibleI | bool | Show or hide the layer |
ModeI | LayerMode | Layer can be drawn or used as a mask |
SourceI | IconSource | Geometry to use for this layer |
BrushI | Brush | Brush used to fill the geometry |
PenI | Pen | Pen used to stroke the geometry |
OpacityI | double | [0..1] Opacity of the layer |
ScaleI | double | Factor to scale the geometry with |
OffsetXI | double | Add an horizontal offset to the layer. 1 unit = 1/2 of the icon width |
OffsetYI | double | Add a vertical offset to the layer. 1 unit = 1/2 of the icon height |
RotationI | double | Rotate the geometry (in degree) |
Test
The sources also contains a small application (FontAwesomeWPF.Test) to play with the various settings.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0-windows7.0 is compatible. net6.0-windows was computed. net6.0-windows7.0 is compatible. net7.0-windows was computed. net7.0-windows7.0 is compatible. net8.0-windows was computed. |
-
net5.0-windows7.0
- No dependencies.
-
net6.0-windows7.0
- No dependencies.
-
net7.0-windows7.0
- No dependencies.
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.0.0 | 163 | 5/18/2023 |