GitXplorerGitXplorer
m

WPFFontAwesome

public
24 stars
4 forks
0 issues

Commits

List of commits on branch main.
Verified
a6401ee07c58ab93ccc03d12168a66e8b60e894d

Delete dependabot.yml

mmeziantou committed 2 years ago
Verified
bcd7c90bc2e74364a64f4ebb7d0d922b5f9632c5

Create FUNDING.yml

mmeziantou committed 3 years ago
Verified
1d20ffccb2d5500c431ba01dcb7ec2e253b6ec47

Merge pull request #60 from meziantou/dependabot/nuget/Microsoft.SourceLink.GitHub-1.1.1

mmeziantou committed 3 years ago
Verified
3ed1ac5df7a2f4f1a9e7ff5094d4468cbcda8859

Bump Microsoft.SourceLink.GitHub from 1.0.0 to 1.1.1

ddependabot[bot] committed 3 years ago
Verified
a97d088457104df204532bb50ac2cbb431b907da

Merge pull request #55 from meziantou/dependabot/nuget/MSTest.TestAdapter-2.2.6

mmeziantou committed 3 years ago
Verified
7bb5497c3ca3c7335e03ce3d001d2a06bc84fbf7

Bump MSTest.TestAdapter from 2.2.5 to 2.2.6

ddependabot[bot] committed 3 years ago

README

The README file for this repository.

Meziantou.WpfFontAwesome

NuGet GitHub license publish

Use FontAwesome in WPF application

Usage

Use the control

  1. Install Nuget package Meziantou.WpfFontAwesome
  2. Add the xml namespace xmlns:fa="clr-namespace:Meziantou.WpfFontAwesome;assembly=Meziantou.WpfFontAwesome"
  3. Use the custom control
<fa:FontAwesomeIcon SolidIcon="AddressBook" FontSize="60" />
<fa:FontAwesomeIcon RegularIcon="AddressBook" FontSize="60" />
<fa:FontAwesomeIcon BrandIcon="Microsoft" FontSize="60" />
<fa:FontAwesomeIcon SolidIcon="Spinner" AnimationType="Spin" FontSize="60" />
<fa:FontAwesomeIcon SolidIcon="Spinner" AnimationType="Pulse" FontSize="60" />

Use the font

  1. Install Nuget package Meziantou.WpfFontAwesome
  2. Add the ResourceDictionary to the app.xaml file
<Application x:Class="Meziantou.WpfFontAwesome.Demo.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/Meziantou.WpfFontAwesome;component/Themes/Generic.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>
  1. Add the xml namespace xmlns:fa="clr-namespace:Meziantou.WpfFontAwesome;assembly=Meziantou.WpfFontAwesome"
  2. Use it
<fa:FontAwesomeIcon SolidIcon="AddressBook" FontSize="60" />
<fa:FontAwesomeIcon RegularIcon="AddressBook" FontSize="60" />
<fa:FontAwesomeIcon BrandIcon="Microsoft" FontSize="60" />
<fa:FontAwesomeIcon SolidIcon="Spinner" AnimationType="Spin" FontSize="60" />
<fa:FontAwesomeIcon SolidIcon="Spinner" AnimationType="Pulse" FontSize="60" />

<TextBlock Text="{fa:Icon AddressBook}" Style="{StaticResource FontAwesomeRegular}" FontSize="60" />
<TextBlock Text="{fa:Icon AddressBook}" Style="{StaticResource FontAwesomeSolid}" FontSize="60" />
<TextBlock Text="{fa:Icon FontAwesome}" Style="{StaticResource FontAwesomeBrand}" FontSize="60" />
<TextBlock Text="{fa:Icon Spinner}" Style="{StaticResource FontAwesomeSolidSpin}" FontSize="60" />
<TextBlock Text="{fa:Icon Spinner}" Style="{StaticResource FontAwesomeSolidPulse}" FontSize="60" />

Use the Pro icon

If you want to use a Pro icon, you need to load the font first:

FontAwesomeIcon.ProSolidFontFamily = new FontFamily(...);