I am wondering if I am missing some thing here.
When using FontAwesome in xaml for iOS it works just fine like this:
<Button Text="" HeightRequest="100" BackgroundColor="DarkRed" TextColor="White" FontSize="36">
<Button.FontFamily>
<OnPlatform x:TypeArguments="x:String" Android="fa-regular-400.ttf#Font Awesome 5 Free Regular" iOS="Font Awesome 5 Free" WinPhone="Assets/fa-regular-400.ttf#Font Awesome 5 Free" />
</Button.FontFamily>
</Button>
But when doing this in the code behind for the page I do not get the icon but its unicode 
;
Here is my code behind code:
var newBtn = new Button()
{
Text = "",
HeightRequest = 100,
BackgroundColor = Color.DarkRed,
TextColor = Color.White,
FontSize = 36
};
newBtn.FontFamily = Device.RuntimePlatform == Device.iOS ? "Font Awesome 5 Free" : null;
When using from within C# code, you have to use it like this:
Text = "\uf11a"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With