Changing Tab Control Background to Gradient

4 posts, 1 answers
  1. Dennis
    Dennis avatar
    62 posts
    Member since:
    Oct 2007

    Posted 11 Dec 2009 Link to this post

    Is there an easy way through XAML or code to change the background for the Tab Control (the is behind the Tab Items) to a gradient brush? I can break out the control template in Blend (and can actually set the fill for rectangle), but it becomes overbearing. It's the only property that I want to change on the control itself.
  2. Answer
    Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 11 Dec 2009 Link to this post

    Hello Dennis,

     You can use the

    BackgroundVisibility="Collapsed"

    property to hide the background behind the items. Then anything you put behind the TabControl will be visible, you can put the gradient there.

    Unfortunately there is no property that changes the brush directly.

    Greetings,
    Miroslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
  4. Dennis
    Dennis avatar
    62 posts
    Member since:
    Oct 2007

    Posted 11 Dec 2009 Link to this post

    Is there why to do it through a Style/Setter without redefining the whole ControlTemplate for the RadTabControl?
  5. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 11 Dec 2009 Link to this post

    Hi Dennis,

    If you ask about the BackgroundVisibility property, it in fact is a property on the RadTabControl and can be set in a style without editing the ControlTemplate.

    Unfortunately the new gradient color will be part of the element that is behind the RadTabControl and it will not be possible to include it in the TabCotnrol Style.

    Best wishes,
    Miroslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top