views:

1156

answers:

2

Hi!

I'm experiencing a visual issue with styling a TabControl in WPF. So even if I set the border of the tab control to be 0px and transparent there is still a very thin line on the right and bottom borders.

I didn't manage to find the property which would resolve that, so maybe someone experienced the same issue and could share it.

Thanks in advance,
Boris

+1  A: 

Are you sure its part of the border and not the DropShadowEffect?

You'll have to override the ControlTemplate to get rid of the border completely. Heres an MSDN Example.

Brandon
The Border named 'Border' inside the TabControl's ControlTemplate is surrounding the ContentPresenter, and putting the border around the TabItem's content, the Border properties on the TabControl won't effect this, so you have to modify the ControlTemplate to remove that border.
rmoore
A: 

That's perfect, I redefined the control template and it works great. Thanks a lot so!

If you use Blend, I just discovered that all simple style are defined in the SimpleStyles.xaml dictionnary, and then when you create a new style or control template, you should use it as reference in order to know what are the defaults.

B.

Boris Gougeon