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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change the TabItem's Title selection attributes

Thread ID:

Created:

Updated:

Platform:

Replies:

142327 Jan 28,2019 08:01 PM UTC Jan 29,2019 11:34 AM UTC Xamarin.Forms 1
loading
Tags: SfTabView
Tito
Asked On January 28, 2019 08:01 PM UTC

Hi,

I want to change the font attributes of the selected tabitem's Title to be Bold.
Is it possible?

I know there is a "SelectionColor" property. What about a "SelectionAttributes" property?

Thank you,

Dhanasekar R [Syncfusion]
Replied On January 29, 2019 11:34 AM UTC

Hi Tito, 
 
Greetings from Syncfusion. 
 
Currently we do not have any property to change the FontAttributes of Text during SelectionChange. But, we can achieve your requirement by changing the FontAttributes of the Title and FontIcon during SelectionChanged event. 
 
void Handle_SelectionChanged(object sender, Syncfusion.XForms.TabView.SelectionChangedEventArgs e)
  {
    foreach (SfTabItem tabitem in (sender as SfTabView).Items)
     {
       if (tabitem.Title == e.Name)
          {
             tabitem.TitleFontAttributes = FontAttributes.Bold;
             tabitem.FontIconFontAttributes = FontAttributes.Bold;
          }
        else
          {
              tabitem.TitleFontAttributes = FontAttributes.None;
              tabitem.FontIconFontAttributes = FontAttributes.None;
          }
      }
  } 


 
We have prepared a sample for the same, please download it from the link given below. 
 
Sample linkTabViewSample 
 
Please let us know if you have any further clarification on this. 
 
Regards, 
Dhanasekar 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;