Binding RadTabControl HeaderTemplate to Selected?

2 posts, 0 answers
  1. Neal Sanche
    Neal Sanche avatar
    6 posts
    Member since:
    Oct 2009

    Posted 31 Mar 2010 Link to this post

    I have a RadTabControl that I've been trying to style. I've edited the HeaderTemplate and have it correctly data binding to my data, however I have been asked to change the colours of icons and text when the tab item is selected. So far, I've only been able to change the state of the TopTemplate when the tab item is selected, but can't figure out how to affect the content in the HeaderTemplate.

    Can you give me any clues? Thanks.

    -Neal
  2. Dimitrina
    Admin
    Dimitrina avatar
    442 posts

    Posted 06 Apr 2010 Link to this post

    Hello Neal Sanche,

    Thank you for your feedback.
    We made some changes in the templates of the Themes in the Q1 release.
    In the previous version of our control it was possible to change the foreground color of TabItem because we used  telerikNavigationPrimitives:TabItemContentPresenter .
     In the new version (Q1) we use ContentPresenter. Unfortunately, it is not possible to change the foreground of the TabItem because of the ContentPresenter that the Tab uses internally. The ContentPresenter itself does not expose a Foreground property.

    Please find attached a project with a workaround. In the project I made a custom theme of TabItem control and replaced the ContentPresenter with ContentControl.  Using this change means that you will not be able to change the theme at Runtime.

    All the best,
    Dimitrina
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
Back to Top