This is a migrated thread and some comments may be shown as answers.

Displaying no headers in RadTabControl

6 Answers 177 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Helly
Top achievements
Rank 1
Helly asked on 06 Sep 2010, 03:45 PM
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?

6 Answers, 1 is accepted

Sort by
0
Accepted
Tina Stancheva
Telerik team
answered on 09 Sep 2010, 03:36 PM
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
0
Helly
Top achievements
Rank 1
answered on 14 Sep 2010, 05:15 PM
Thanks.
It works.)
0
Andrew
Top achievements
Rank 1
answered on 24 Feb 2012, 05:38 AM
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
0
Kiril Stanoev
Telerik team
answered on 27 Feb 2012, 03:43 PM
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 >>
0
Andrew
Top achievements
Rank 1
answered on 28 Feb 2012, 06:25 AM
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
0
MiddleTommy
Top achievements
Rank 1
answered on 12 Apr 2012, 10:39 PM
This is the logic I needed to put in my ViewModel
Thanks
Tags
TabControl
Asked by
Helly
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Helly
Top achievements
Rank 1
Andrew
Top achievements
Rank 1
Kiril Stanoev
Telerik team
MiddleTommy
Top achievements
Rank 1
Share this question
or