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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Tab header customization

Thread ID:





144978 May 31,2019 04:43 AM UTC May 31,2019 10:35 AM UTC Xamarin.Forms 1
Tags: SfTabView
Asked On May 31, 2019 04:43 AM UTC


I want to know if the following header customization is possible using sftabview.

I am loading n number of tabs with scroll enabled, each tab loads a sf chart, all binded to the same data source and refreshed on tab index changed.

I want to change the tab header color, say red or green, based on the tab content i render on tab click - but the catch is i want to pre-load the tab color before moving to the particular index so that i go and click the tabs which are only red. Is there any way to achieve this using sftabview?


Muneesh Kumar G [Syncfusion]
Replied On May 31, 2019 10:35 AM UTC

Hi Ramesh, 
We have validated your query, you can achieve your requirement by using OnAppearing override method as per the below code snippet. 
Code Snippet: 
protected override void OnAppearing() 
            foreach (var tabItem in tabView.Items) 
                if (tabItem.Content is StackLayout) 
                    tabItem.TitleFontColor = Color.Red; 
                    tabItem.SelectionColor = Color.Red; 
                    tabItem.TitleFontColor = Color.Green; 
                    tabItem.SelectionColor = Color.Green; 
Here we set the title color & selection color of the tab based on the tab item content. Please find the sample from below link. 
We request you to try our sample. If your requirement different from this, please provide us more details about your requirement or modify the sample above and send it back to us.  
Muneesh Kumar G. 


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

Live Chat Icon For mobile
Live Chat Icon