tweaking tab drawing

Docking/MDI for WPF Forum

Posted 9 years ago by John Dunn
Version: 16.1.0633
Avatar

I'm trying to make the Document tabs draw in a very simple format but am running into issues. See http://imgur.com/a/f6A02

The top image is what I have been able to acheive with the following stye

    <Style x:Key="DefaultTabStyle" TargetType="{x:Type docking:AdvancedTabControl}">
      <Setter Property="TabBorderBrushActiveSelected " Value="#b9b9b9"></Setter>
      <Setter Property="TabBorderBrushInactiveSelected " Value="#b9b9b9"></Setter>
      <Setter Property="TabBackgroundActiveSelected" Value="AliceBlue"></Setter>
      <Setter Property="TabBackgroundInactiveSelected" Value="AliceBlue"></Setter>
      <Setter Property="TabForegroundActiveSelected" Value="Dimgray"></Setter>
      <Setter Property="TabForegroundInactiveSelected" Value="Dimgray"></Setter>
      <Setter Property="TabPadding" Value="3,6,3,6"></Setter>
      <Setter Property="HighlightThickness" Value="0"/>
      <Setter Property="TabCornerRadius" Value="0"></Setter>
      <Setter Property="TabBorderBrush" Value="#b9b9b9"/>
      <Setter Property="BorderThickness" Value="0"/>
      <Setter Property="TabBackground" Value="#d8d8d8"/>
    </Style>

 The bottom part of the image show how I'd like things to look. Problems include

  • 2 px instead of 1 px lines between tabs. I tried setting BorderThickness to 0,1,1,1 but it doesn't appear to actually pay attention to that
  • need 1 px border at the bottom of the unselected tabs 
  • get rid of the 1 px 'hanger downs' on each side of the selected tab

Is there a way to coerce the AdvancedTabControl to do my bidding? If not, what other options are there?

Comments (2)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi John,

I'd probably suggest removing the BorderThickness setting and add this one instead:

<Setter Property="TabSpacing" Value="-1"/>

That should remove the border issues, "hanger downs", and ensure there's a single line between tabs.


Actipro Software Support

Posted 9 years ago by John Dunn
Avatar

Thanks, that worked.

The latest build of this product (v25.1.0) was released 27 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.