Hi,
I'd like to restyle the tab-buttons in the docking window component in such a way, that they use the whole control size and have an equal width then.
So I mofified the docking:TabbedMdiHost style (from the styles package):
<Setter Property="TabControlStyle">
<Setter.Value>
<Style TargetType="docking:TabbedMdiContainerTabControl">
<!--<Setter Property="TabCornerRadius" Value="10,10,0,0" />-->
<Setter Property="TabBackground" Value="LightGray" />
<Setter Property="TabBackgroundInactiveSelected" Value="White" />
<Setter Property="TabBackgroundActiveSelected" Value="Red" />
<Setter Property="TabBackgroundPointerOver" Value="Gray" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="docking:AdvancedTabControl">
<Grid KeyboardNavigation.TabNavigation="Local">
<Grid.RowDefinitions>
<RowDefinition x:Name="RowDef0" Height="*" />
<RowDefinition x:Name="RowDef1" Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColDef0" Width="*" />
<ColumnDefinition x:Name="ColDef1" Width="Auto" />
</Grid.ColumnDefinitions>
<Rectangle x:Name="HeaderBackground" Grid.Row="1" Grid.ColumnSpan="2" Fill="{TemplateBinding HeaderBackground}" />
<Grid x:Name="HeaderPanel" Grid.Row="1" Panel.ZIndex="1" ClipToBounds="True"
KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.TabIndex="1">
<dockingPrimitives:NewTabButton x:Name="PART_NewTabButton" Panel.ZIndex="2" HorizontalAlignment="Left" Style="{TemplateBinding NewTabButtonStyle}"
Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HasNewTabButton, Converter={StaticResource BooleanToVisibilityConverter}}"
TabStripPlacement="{TemplateBinding TabStripPlacement}" IsContentHorizontal="{TemplateBinding IsTabContentHorizontal}" Padding="{TemplateBinding TabPadding}"
CornerRadius="{TemplateBinding TabCornerRadius}" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RequestNewTabCommand}">
<TextBlock Text="+" Opacity="0" />
</dockingPrimitives:NewTabButton>
<!--O. Rutsch: In diesem Presenter werden die Tab-Buttons angezeigt-->
<!--<ItemsPresenter/>-->
<UniformGrid IsItemsHost="True" Rows="1" />
</Grid>
Look at the end of the file: I've exchanged the ItemsPresenter with a UniformGrid and the tab-buttons are now equally spaced. This looks already fine but unfortunately I can't move or dock the tab-windows anymore. It looked that all docking functionality got lost here.
Any idea what to do?
Thanks and bye
Oliver