Skip to content

Instantly share code, notes, and snippets.

@juucustodio
Last active April 2, 2019 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juucustodio/ad6e090fa88f7ff9312a716b722f8be2 to your computer and use it in GitHub Desktop.
Save juucustodio/ad6e090fa88f7ff9312a716b722f8be2 to your computer and use it in GitHub Desktop.
Example of how to use Font Awesome in Xamarin.Forms Applications - http://julianocustodio.com/fontawesome
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:FontAwesomeDemo"
x:Class="FontAwesomeDemo.MainPage">
<StackLayout VerticalOptions="CenterAndExpand">
<Button Text="&#xf007;" FontSize="36">
<Button.FontFamily>
<OnPlatform x:TypeArguments="x:String" Android="fa-solid-900.ttf#Font Awesome 5 Free Solid"
iOS="Font Awesome 5 Free"/>
</Button.FontFamily>
</Button>
<Label Text="&#xf007;" FontSize="36" HorizontalTextAlignment="Center">
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String" Android="fa-solid-900.ttf#Font Awesome 5 Free Solid"
iOS="Font Awesome 5 Free"/>
</Label.FontFamily>
</Label>
</StackLayout>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment