10 Answers, 1 is accepted
I am not sure what is behind CustomStyleHere. If it is a custom style that targets RadTabItem and you use implicit styling, it should be based on the Telerik RadTabItemStyle that we provide with our source. However I have tested on my end the following custom style (in the RadTabControl.Resources) and it works as expected:
If you use StyleManager, just remove the BasedOn from the style above.
In case you still experience issues with this style, I would appreciate if it is possible to send us a small project with all related customizations.
I created a WPF <UserControl></UserControl> and replaced it with <telerik:RadTabItem></telerik:RadTabItem>. I also changed the inherited class in the code behind. Tabs are added with Region.RequestNavigation and display at run-time correctly, but in the designer there is no styling and I cannot see the tab's content. I had to put that content in a separate user control and view it there. I prefer not do do that.
I had a similar problem with the RadDocumentTab and found the following article which corrected the design time behavior.
this is my app.xaml
in my user control I have this
My views are in a separate PRISM module if that makes a difference and I am using the NoXaml dlls.
Thanks in advance
Can you please send us the custom UserControl implementation and the way the TabItems are added in your application? Why do you need these UserControls? The best option would be if you manage to isolate them in a separate project and check whether the same issue appears.
To achieve your requirement, you can extract the ControlTemplate of RadTabItem, and set the CornerRadius property of the corresponding elements. Here are a few steps that you can use as a reference:
- Find the corresponding .xaml file for the theme you use and copy the ControlTemplate with x:Key set to "TabItemTemplate". You can see how to do this in the Editing Control Templates article.
- In your application create a Style object that targets RadTabItem and set the Template property using the copied ControlTemplate.
- In the ControlTemplate find the Border controls with x:Name set to "MouseOverVisual" and "SelectionVisual". Then, set their CornerRadius properties.
- Apply the Style with the custom ControlTemplate to the tab items using the ItemContainerStyle property of RadTabControl.
I hope this helps.
I've attached a small sample project showing the approach I've described. I hope it helps.
If you have other questions that are not related to the original topic of this thread, can you please open a new forum about it?