Skip to content

Instantly share code, notes, and snippets.

@juucustodio

juucustodio/MainPage.xaml

Last active Apr 2, 2019
Embed
What would you like to do?
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
You can’t perform that action at this time.