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

Can I have rounded tabs in TabbedWindow?

3 Answers 546 Views
TabbedWindow
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Veteran
Robert asked on 03 Jun 2020, 07:09 AM

I have modified the control template of TabbedWindow. But I cant find the actual tab ("handle"). How/where can I set Corenrradius="x"?

 

3 Answers, 1 is accepted

Sort by
0
Robert
Top achievements
Rank 1
Veteran
answered on 03 Jun 2020, 10:56 AM

It is an ItemsPresenter-element, but I dont seem to get rounded corners on it. see 

https://stackoverflow.com/questions/62171110/wpf-how-to-get-rounded-corners-on-itemspresenter

0
Vicky
Telerik team
answered on 04 Jun 2020, 08:54 AM

Hello Robert,

Larger part of Telerik UI for WPF's Themes Suite already have a CornerRadius applied to their RadTabbedWindow's tab items. The Windows8, Windows8Touch, Office2013, VisualStudio2013 and VisualStudio2019 do not have such. Office2016, Office2016Touch, Material, Fluent and Crystal themes support theme Palette CornerRadius properties, which could (or already are used), yet the same default to 0 for the tab items. For example, if you wish to use the Office2016Theme, you only need to set the CornerRadiusTop property to (6,6,0,0) for example to achieve the desired result.

To change the corner radius of the tab items for all other themes, you need to extract the default ControlTemplate of the RadTabItem, modify it up to your liking and then assign it as the ItemContainerStyle property of the RadTabbedWindow. The required XAML file in your case is the Telerik.Windows.Controls.Navigation.xaml file under the chosen theme's folder.

I also highly recommend using the ThemeHelper class and its CornerRadius property, which will give you more flexibility. Since VisualStudio2013 theme is one of the themes without corner radius, I prepared a sample project for your convenience, using the previously mentioned suggestions, i.e. - extracting the template of the RadTabItem, setting CornerRadius to all the borders, representing the states of the tab item and TemplateBinding this CornerRadius to the ThemeHelper's. 

You can find the sample project attached to my reply. It uses the NoXAML version of the dlls and has the VisualStudio2013 theme applied.
Please, give it a try and let me know if it helped.

Regards,
Vicky
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Robert
Top achievements
Rank 1
Veteran
answered on 17 Jun 2020, 05:11 AM
Forgot to thank you for this insightful and informative answer. Thanks!
Tags
TabbedWindow
Asked by
Robert
Top achievements
Rank 1
Veteran
Answers by
Robert
Top achievements
Rank 1
Veteran
Vicky
Telerik team
Share this question
or