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

Failed to set Custom TTF font on the TabItem labels

Hello, everyone.

I am new in Syncfusion Xamarin controls, testing navigation drawer, nested tabviews and gauges now.
I am developing my app with Xamarin.Forms 4.0 and Syncfusion 17.1.0.49 from NuGet packages.

The problem I am struggling to solve is ...
I can not change the font of labels on the TabItem of TabView.

See the following fragment.
<tabView:SfTabItem Title="Lobby" TitleFontFamily="MonoFont" TitleFontSize="20">  ... </tabView:SfTabItem>

TitleFontFamily is not working. TileFontSize is working.
The given tab label is displayed by default font. maybe TitleFontFamily is ignored.
MonoFont itself is not problem because normal Xamarin.Forms controls can display that font without problems.

I tested Custom Header and checked I can change the font.
But custom Header is not the option, because I want to keep Selection Indicator.

Is there no way to change the font?

Thanks,
Chihun

3 Replies

MK Muneesh Kumar G Syncfusion Team June 3, 2019 12:30 PM UTC

Hi Chihun, 
 
Greetings from Syncfusion. 
 
We have validated your query, we have created a sample to achieve your requirement. Please find the sample from below link. 
 
Sample Link: 
 
Please refer below link for referring custom fonts 
 
 
Please find the code snippet for this 
 
 <ContentPage.Resources>
        <
ResourceDictionary>
            <
OnPlatform x:TypeArguments="x:String" x:Key="fonts" iOS="Snell Roundhand" Android="Snell Roundhand.ttf#Snell Roundhand"   WinPhone="Snell Roundhand.ttf#SnellRoundhand Script" />
        </
ResourceDictionary>
   </
ContentPage.Resources
            ...
     <
tabView:SfTabItem Title = "Contacts" TitleFontSize="20" TitleFontFamily="{StaticResource fonts}">
            ...
 
 
Screenshot: 
 
 
 
Please get back us, if you have any concern. 
 
Regards,
Muneesh Kumar G. 
 



CH Chihun June 4, 2019 01:15 AM UTC

Thanks!

It works.


MK Muneesh Kumar G Syncfusion Team June 4, 2019 05:44 AM UTC

Hi Chihun, 
 
Thanks for the update. 
  
We are glad to know that the given solution works. Please let us know if you need any further assistance. 
 
Regards,
Muneesh Kumar G. 
 


Loader.
Up arrow icon