1

In unicode I have a character that I specify by "\uf2fc" Can someone tell me how I can go about converting the unicode form show in the FO docs to those I can use in XAML? The XAML values used to be listed on the web pages but it no longer lists them and just gives the Unicode.

https://fontawesome.com/icons/rectangle-wide?style=regular

Note that the new versions of the cheat sheet don't include the XAML codes like the old versions did.

https://fontawesome.com/cheatsheet/pro

Alan2
  • 23,493
  • 79
  • 256
  • 450

1 Answers1

1

Another approach would be to implement a class "FontAwesome.cs" and then fill it with static variables:

public class FontAwesome
{
    public static string FAGlass = "\uf000";
    public static string FAMusic = "\uf001";
    public static string FASearch = "\uf002";
    public static string FAEnvelopeO = "\uf003";
    public static string FAHeart = "\uf004";
    public static string FAStar = "\uf005";
    public static string FAStarO = "\uf006";
    public static string FAUser = "\uf007";
    public static string FAFilm = "\uf008";
    public static string FAThLarge = "\uf009";
    public static string FATh = "\uf00a";
    public static string FAThList = "\uf00b";
    public static string FACheck = "\uf00c";
    public static string FATimes = "\uf00d";
    public static string FASearchPlus = "\uf00e";
    ...
}

Then whenever needed, you can access it in your xaml with:

<Label Text="{x:Static fontAwesome:FontAwesome.FABriefcase}" />

Note that this requires you to include the class in your Xaml:

xmlns:fontAwesome="clr-namespace:MyApp.Globals;assembly=MyApp"
Markus Michel
  • 2,289
  • 10
  • 18