Displaying no headers in RadTabControl

7 posts, 1 answers
  1. Helly
    Helly avatar
    6 posts
    Member since:
    Sep 2010

    Posted 06 Sep 2010 Link to this post

    I am using RadTabControl and I need to make Headers not displayable for all TabItems (I use other control for navigation through them).
    So, how to do this?
  2. Answer
    Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 09 Sep 2010 Link to this post

    Hi Helly,

    You will need to edit the ControlTemplate of the RadTabControl and set the Visibility of the ItemsPresenter displaying the TabItems Header to Collapsed:
    <ScrollViewer x:Name="ScrollViewerElement" Margin="2 0 2 -1" BorderThickness="0"
                  HorizontalScrollBarVisibility="{Binding (ScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}"
                  VerticalScrollBarVisibility="Disabled">
        ...
        <!--Header ItemsPresenter-->
        <ItemsPresenter Visibility="Collapsed" />
        ...
    </ScrollViewer>

    You can take a look at the attached project that illustrates this approach. Also, here you can find more information on how to edit teh ControlTemplates of RadControls in ExpressionBlend.

    All the best,
    Tina Stancheva
    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
  4. Helly
    Helly avatar
    6 posts
    Member since:
    Sep 2010

    Posted 14 Sep 2010 Link to this post

    Thanks.
    It works.)
  5. Andrew
    Andrew avatar
    29 posts
    Member since:
    Oct 2010

    Posted 23 Feb 2012 Link to this post

    I wonder what would be the easiest way to show that part only if number of items in RadTabControl is greater than one?

    Thanks!
    Andrew
  6. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 27 Feb 2012 Link to this post

    Hi Andrew,

    This functionality can easily be achieved with an attached property. Could you please take a look at the attached project and let me know if the suggested approach works for you. I'd be glad to further assist you.

    Greetings,
    Kiril Stanoev
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  7. Andrew
    Andrew avatar
    29 posts
    Member since:
    Oct 2010

    Posted 28 Feb 2012 Link to this post

    Hi Kiril,

    Thanks for the sample! I was hoping there is a way to hide or show the tab strip automatically depending on number of tabs that tab control currently contains (I was going to create a style or a property that would take care of it), but perhaps I am asking for too much :) Of course, I can track the number of tabs myself, it's just a bit inconvenient, that's it.

    I guess I am also using tab control not in the way it was supposed to be used, but since the nested docking is not supported I have to be creative :(

    Cheers,
    Andrew
  8. MiddleTommy
    MiddleTommy avatar
    163 posts
    Member since:
    Nov 2009

    Posted 12 Apr 2012 Link to this post

    This is the logic I needed to put in my ViewModel
    Thanks
Back to Top
DevCraft banner