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

TabControl dynamic header style/template


I would like to use the tabcontrol with some more flexibility than the default properties for changing the selectedFore- and background.

I tried using the headertemplateselector, but that's only firing once on loading. Is there a way to define a style/template per header with a different style/template?

I would like to change the fontsize etc. of the header when it's selected. Also would be nice if there is a kind of hover behaviour for the not selected items.

Hope you can help me.

5 Replies

VJ Victory Jessie Selvam D Syncfusion Team November 4, 2013 01:56 PM UTC

Hi Veeningen,

Sorry for the delay being caused.

We have prepared a sample to achieve your requirement. In the sample we have set the ItemContainerStyle of SfTabControl this applies different templates(defined in resources) for the ContentPresenter displaying header based on visual states. For the hover behavior, we have changed the HeaderTemplate of the tab item when mouse is hover the tabitem using tabcontrol's pointer events.

Please let us know whether the provided sample meets your requirement.



AA aaron February 4, 2014 08:46 PM UTC

I’m having a similar issue. I have a Tab item header that must be a data template. When switching to FullscreenPortrait mode I need to be able to control one of the properties in the template. I tried to download the sample zip file provided but my Download failed.   

VV Vignesh V Syncfusion Team February 5, 2014 12:27 PM UTC

Hi Aaron,

Sorry about the inconvenience caused.

Due to some internal server problems, attached sample is unable to download. We have re-uploaded the sample and it can be downloaded from below link.

Sample link:  TabControl_114157

Please let us know if you have any queries.

Vignesh V

DD Dave Davis February 5, 2014 07:24 PM UTC

This sample does not adjust based upon device orientation.  Do you have an example that does that?

RD Ravuthasamy D Syncfusion Team February 6, 2014 04:08 PM UTC

Hi Dave,

We have prepared a simple sample to address your requirement 'To change Template while orientation is changed’, In order to achieve this requirement we need to use two different Templates(for ItemTemplate),it is not possible with single template.

Please find the sample in below link,

Sample Link : http://www.syncfusion.com/downloads/support/directtrac/general/TabControl_114157465947151.zip

Please let us know if you need any further assistance,


Ravuthasamy D

Live Chat Icon For mobile
Up arrow icon