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

make the Tab Item border visible = false

3 Answers 132 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 23 Jul 2011, 06:36 AM
Hello,

Attached is an image of our silverlight app.

Looking at the main menu tab items in the ribbon, you will see that the non current tabs have no border and the background is transparent.

If you look at the other 2 tab controls, you will see that the non current tabs have a border and a background.

Please excuse such a simple question but my silverlight guy is on holiday. Can you please explain how do you set the tabitem style to match the main menu ribbon tab items so that they have no border. Please can you give a xaml and C# example.

Many thanks

Steven

3 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 27 Jul 2011, 02:11 PM
Hello Steven,

 By default there are no such visible borders in the RadTabItems. The RadTabControl from the picture probably uses an ItemTemplate in which there are controls with Borders set. I prepared a sample for you in which there is DataTemplate defined too but there are no borders. So my advice is to review the ItemTemplate of the RadTabControl used in your project.

Kind regards,
Petar Mladenov
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Alexey
Top achievements
Rank 1
answered on 24 Aug 2011, 03:34 AM
Hello Petar,

I've tried to apply your solution to my RadTabControl, but it didn't help.

This is the declaration of TabControl into XAML
<telerikNavigation:RadTabControl x:Name="radTabThing" Grid.Row="2" Background="Transparent" Height="Auto" SelectionChanged="radTabThing_SelectionChanged" ContentTemplate="{StaticResource TabContentTemplate}"/>

And this is a C# part:
radTabThing.ItemTemplate = null;
this.radTabThing.ItemsSource = Enumerable.Range(0, 15).Select(x => new DataItem() { Name = "Item" + x });
// Data item is the same to your example

I don't use radTabThing anywhere except of this code.

Regards,
Alex
0
Petar Mladenov
Telerik team
answered on 29 Aug 2011, 08:36 AM
Hi Alexey,

Please excuse me for misleading you in my last post. Actually in the picture you sent us. I can see that the OfficeBlue theme is applied and the borders in the RadTabItems come from the theme. So you have to get the Style of the RadTabItem from the OfficeBlue theme and edit it. You can find this style in the Themes subfolder of the installation folder of RadControls. Please let us know if you need assistance in this.

Greetings,
Petar Mladenov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
TabControl
Asked by
Steven
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Alexey
Top achievements
Rank 1
Share this question
or