We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Multiple bindings in a button


I have a button where I use fontfamily fontawesome and another fontfamily.

The text I want to write is:  " Facebook"

My issue is that Facebook is also detected as a fontawesome key.

So I would like to do:

<Run Text="&#xf39e;" FontFamily="{StaticResource FontAwesomeBrands}"/>
<Run Text="Facebook" FontFamily="{StaticResource MyOtherFont}"/>

In WPF run does the job. In xamarin forms it's not existing.

How can I do it?


1 Reply

BK Bharathiraja K Syncfusion Team June 5, 2019 06:51 AM

Hi Alexis, 
Greetings from Syncfusion. We have prepared the sample to add Font- Awesome style and other custom style to button, the sample will be downloaded from below link. 
The FontFamily property of the SfButton is used to customize the font family of the text. 
<buttons:SfButton Text="Facebook" FontFamily="{StaticResource Lobster-Regular}" TextColor="White" HorizontalOptions="FillAndExpand" VerticalOptions="Start" HeightRequest="40" CornerRadius="15"> 
To display Font Awesome icons, we can use image source as like the below code snippet. 
<buttons:SfButton  Text="" x:Name="buttonCallMobile" Clicked="ButtonCallMobile_OnClicked" ShowIcon="true" BackgroundColor="White" > 
                <FontImageSource Glyph="&#xf39e;" Size="15" Color="{StaticResource RarikBlue}"  
                                         FontFamily="{StaticResource FontfamilyFontAwesome}"> 

Live Chat Icon For mobile
Up arrow icon