I have created a custom ToolWindowContainer with a property DockDirection (of type Dock) and the following control template. It works very well.
<ControlTemplate TargetType="{x:Type Controls:DockableToolWindowContainer}">
<ControlTemplate.Resources>
<Style x:Key="{x:Type docking:ToolWindow}" TargetType="{x:Type docking:ToolWindow}">
<Style.BasedOn>
<Style TargetType="{x:Type docking:ToolWindow}">
<Setter Property="Background" Value="{DynamicResource {ComponentResourceKey ResourceId=ToolWindowTabBackgroundNormal, TypeInTargetAssembly={x:Type docking:DockSite}}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {ComponentResourceKey ResourceId=ToolWindowTabBorderNormal, TypeInTargetAssembly={x:Type docking:DockSite}}}"/>
<Setter Property="BorderThickness" Value="1,1,1,1"/>
<Setter Property="Foreground" Value="{DynamicResource {ComponentResourceKey ResourceId=ToolWindowTabForegroundNormal, TypeInTargetAssembly={x:Type docking:DockSite}}}"/>
<Setter Property="Margin" Value="0,0,-1,2"/>
<Setter Property="Padding" Value="2,2,4,2"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type docking:ToolWindow}">
<Grid>
<Border x:Name="border" ClipToBounds="True" SnapsToDevicePixels="True" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0,0,3,3">
<shared:PixelSnapper>
<DockPanel LastChildFill="True">
<Image Margin="2,2,0,2" x:Name="image" VerticalAlignment="Center" Width="16" Height="16" SnapsToDevicePixels="True" Source="{TemplateBinding ImageSource}" Stretch="UniformToFill" DockPanel.Dock="Left" AutomationProperties.Name="Image"/>
<docking:TruncationDecorator IsTruncated="{Binding Path=IsTitleTruncated, Mode=OneWayToSource, RelativeSource={RelativeSource TemplatedParent}}">
<TextBlock Margin="{TemplateBinding Padding}" VerticalAlignment="Center" SnapsToDevicePixels="True" Text="{TemplateBinding Title}" TextTrimming="CharacterEllipsis" AutomationProperties.Name="Title"/>
</docking:TruncationDecorator>
</DockPanel>
</shared:PixelSnapper>
</Border>
<Border x:Name="highlight" VerticalAlignment="Bottom" Height="3" SnapsToDevicePixels="True" Visibility="Collapsed" Background="{DynamicResource {ComponentResourceKey ResourceId=ToolWindowTabHighlight, TypeInTargetAssembly={x:Type docking:DockSite}}}" CornerRadius="0,0,3,3"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="ImageSource" Value="{x:Null}">
<Setter Property="Visibility" TargetName="image" Value="Collapsed"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource {ComponentResourceKey ResourceId=ToolWindowTabBackgroundHover, TypeInTargetAssembly={x:Type docking:DockSite}}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {ComponentResourceKey ResourceId=ToolWindowTabBorderHover, TypeInTargetAssembly={x:Type docking:DockSite}}}"/>
<Setter Property="Foreground" Value="{DynamicResource {ComponentResourceKey ResourceId=ToolWindowTabForegroundHover, TypeInTargetAssembly={x:Type docking:DockSite}}}"/>
<Setter Property="Visibility" TargetName="highlight" Value="Visible"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{DynamicResource {ComponentResourceKey ResourceId=ToolWindowTabBackgroundSelected, TypeInTargetAssembly={x:Type docking:DockSite}}}"/>
<Setter Property="Foreground" Value="{DynamicResource {ComponentResourceKey ResourceId=ToolWindowTabForegroundSelected, TypeInTargetAssembly={x:Type docking:DockSite}}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {ComponentResourceKey ResourceId=ToolWindowTabBorderSelected, TypeInTargetAssembly={x:Type docking:DockSite}}}"/>
<Setter Property="BorderThickness" Value="1,0,1,1"/>
<Setter Property="Margin" Value="0,0,-1,0"/>
<Setter Property="Padding" TargetName="border" Value="0,1,0,0"/>
<Setter Property="Visibility" TargetName="highlight" Value="Visible"/>
</Trigger>
<Trigger Property="IsTitleTruncated" Value="True">
<Setter Property="ToolTip" TargetName="border" Value="{Binding Path=Title, RelativeSource={RelativeSource TemplatedParent}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.BasedOn>
<Style TargetType="{x:Type docking:DockingWindow}">
<Setter Property="AutomationProperties.Name" Value="{Binding Path=Title, RelativeSource={RelativeSource Self}}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type docking:DockingWindow}">
<ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Style.BasedOn>
</Style>
</Style.BasedOn>
</Style>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
</ControlTemplate.Resources>
<Grid x:Name="splitterGrid">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid x:Name="tabPanelGrid" Grid.Column="1" Grid.Row="2">
<Border x:Name="tabPanelBorder" VerticalAlignment="Top" Height="3" SnapsToDevicePixels="True" Background="{TemplateBinding TabBarSpacerBackground}" BorderBrush="{TemplateBinding TabBarSpacerBorderBrush}" BorderThickness="0,0,0,1" >
<Border.Visibility>
<Binding Path="IsTabBarVisible" RelativeSource="{RelativeSource TemplatedParent}">
<Binding.Converter>
<BooleanToVisibilityConverter/>
</Binding.Converter>
</Binding>
</Border.Visibility>
</Border>
<docking:ToolWindowTabPanel Margin="0,2,0,1" x:Name="PART_ItemsHost" ClipToBounds="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" IsItemsHost="True">
<docking:ToolWindowTabPanel.Visibility>
<Binding Path="IsTabBarVisible" RelativeSource="{RelativeSource TemplatedParent}">
<Binding.Converter>
<BooleanToVisibilityConverter/>
</Binding.Converter>
</Binding>
</docking:ToolWindowTabPanel.Visibility>
</docking:ToolWindowTabPanel>
</Grid>
<Grid x:Name="rootGrid" Grid.Column="1" Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<shared:PixelSnapper>
<Border x:Name="titleBarBorder" SnapsToDevicePixels="True" Background="{TemplateBinding TitleBarBackgroundInactive}" BorderBrush="{TemplateBinding TitleBarBorderInactiveBrush}" BorderThickness="{TemplateBinding TitleBarBorderThickness}" CornerRadius="{TemplateBinding TitleBarBorderCornerRadius}">
<Border.Visibility>
<Binding Path="SelectedItem.HasTitleBarResolved" RelativeSource="{RelativeSource TemplatedParent}">
<Binding.Converter>
<BooleanToVisibilityConverter/>
</Binding.Converter>
</Binding>
</Border.Visibility>
<DockPanel Margin="{TemplateBinding Padding}" x:Name="PART_TitleBar" Background="#00FFFFFF" LastChildFill="True">
<docking:TitleBarButton x:Name="closeButton" ToolTip="Close" Focusable="False" CommandTarget="{Binding Path=., RelativeSource={RelativeSource TemplatedParent}}" DockPanel.Dock="Right" AutomationProperties.Name="Close">
<docking:TitleBarButton.Command>
<RoutedUICommand Text="Close"/>
</docking:TitleBarButton.Command>
<docking:TitleBarButton.Visibility>
<Binding Path="SelectedItem.CanCloseResolved" RelativeSource="{RelativeSource TemplatedParent}">
<Binding.Converter>
<BooleanToVisibilityConverter/>
</Binding.Converter>
</Binding>
</docking:TitleBarButton.Visibility>
<Canvas Width="12" Height="12">
<Path Fill="{Binding Path=Foreground, ElementName=closeButton}" Stretch="Fill" Width="8" Height="8" Data="M0,0L1,0 4,3 7,0 8,0 8,1 5,4 8,7 8,8 7,8 4,5 1,8 0,8 0,7 3,4 0,1z" Canvas.Left="2" Canvas.Top="2"/>
</Canvas>
</docking:TitleBarButton>
<docking:TitleBarButton x:Name="autoHideButton" ToolTip="Auto Hide" Focusable="False" CommandTarget="{Binding Path=., RelativeSource={RelativeSource TemplatedParent}}" DockPanel.Dock="Right" AutomationProperties.Name="Auto-Hide">
<docking:TitleBarButton.Command>
<RoutedUICommand Text="Auto Hide"/>
</docking:TitleBarButton.Command>
<docking:TitleBarButton.Visibility>
<Binding Path="SelectedItem.CanAutoHideResolved" RelativeSource="{RelativeSource TemplatedParent}">
<Binding.Converter>
<BooleanToVisibilityConverter/>
</Binding.Converter>
</Binding>
</docking:TitleBarButton.Visibility>
<Grid>
<Canvas x:Name="pinnedGlyph" Width="12" Height="12">
<Path Fill="{Binding Path=Foreground, ElementName=closeButton}" Stretch="Fill" Width="7" Height="10" Data="F1M2,7L3,7 3,1 8,1 8,7 6,7 6,2 4,2 4,7 9,7 9,8 6,8 6,11 5,11 5,8 2,8" Canvas.Left="2" Canvas.Top="1"/>
</Canvas>
<Canvas x:Name="unpinnedGlyph" Width="12" Height="12" Visibility="Collapsed">
<Path Fill="{Binding Path=Foreground, ElementName=closeButton}" Stretch="Fill" Width="10" Height="7" Data="F1M5,3L5,4 11,4 11,9 5,9 5,7 10,7 10,5 5,5 5,7 5,10 4,10 4,7 1,7 1,6 4,6 4,3" Canvas.Left="1" Canvas.Top="3"/>
</Canvas>
</Grid>
</docking:TitleBarButton>
<docking:TitleBarButton x:Name="optionsButton" ToolTip="Options" Focusable="False" CommandParameter="{Binding RelativeSource={RelativeSource Self}}" CommandTarget="{Binding Path=., RelativeSource={RelativeSource TemplatedParent}}" DockPanel.Dock="Right" DisplayMode="PopupOnly" AutomationProperties.Name="Options">
<docking:TitleBarButton.Visibility>
<Binding Path="SelectedItem.HasOptionsResolved" RelativeSource="{RelativeSource TemplatedParent}">
<Binding.Converter>
<BooleanToVisibilityConverter/>
</Binding.Converter>
</Binding>
</docking:TitleBarButton.Visibility>
<docking:TitleBarButton.Command>
<RoutedUICommand Text="Options"/>
</docking:TitleBarButton.Command>
<Canvas Width="12" Height="12">
<Path Fill="{Binding Path=Foreground, ElementName=closeButton}" Stretch="Fill" Width="8" Height="4" Data="F1M2,6.01038L10,6 6.39404,9.55326 6.3947,10 5.6036,10 5.60293,9.55326 2,6.01038z" Canvas.Left="2" Canvas.Top="6"/>
</Canvas>
</docking:TitleBarButton>
<shared:PixelSnapper VerticalAlignment="Center">
<shared:ZeroSizeContentControl ClipToBounds="True" HasWidth="False">
<TextBlock Margin="3,1,2,1" x:Name="title" Foreground="{TemplateBinding TitleBarForegroundInactive}" Text="{Binding Path=SelectedItem.Title, RelativeSource={RelativeSource TemplatedParent}}" TextTrimming="CharacterEllipsis" AutomationProperties.Name="Title"/>
</shared:ZeroSizeContentControl>
</shared:PixelSnapper>
</DockPanel>
</Border>
</shared:PixelSnapper>
<Border SnapsToDevicePixels="True" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.Row="1">
<shared:TransitionPresenter x:Name="PART_SelectedContentHost" Content="{Binding Path=SelectedContent, RelativeSource={RelativeSource TemplatedParent}}" DefaultDuration="00:00:00.1500000" TransitionSelector="{TemplateBinding docking:DockSite.ToolWindowTransitionSelector}"/>
</Border>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="docking:TitleBarButton.IsActive" Value="True">
<Setter Property="Background" TargetName="titleBarBorder" Value="{Binding Path=TitleBarBackgroundActive, RelativeSource={RelativeSource TemplatedParent}}"/>
<Setter Property="BorderBrush" TargetName="titleBarBorder" Value="{Binding Path=TitleBarBorderActiveBrush, RelativeSource={RelativeSource TemplatedParent}}"/>
<Setter Property="Foreground" TargetName="title" Value="{Binding Path=TitleBarForegroundActive, RelativeSource={RelativeSource TemplatedParent}}"/>
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Path=SelectedItem.HasTitleBarResolved, RelativeSource={RelativeSource Self}}" Value="False"/>
</MultiDataTrigger.Conditions>
<Setter Property="BorderThickness" Value="1,1,1,1"/>
</MultiDataTrigger>
<Trigger Property="HasSingleWindow" Value="True">
<Setter Property="Visibility" TargetName="tabPanelBorder" Value="Collapsed"/>
<Setter Property="Visibility" TargetName="PART_ItemsHost" Value="Collapsed"/>
</Trigger>
<Trigger Property="HasWindows" Value="False">
<Setter Property="Visibility" TargetName="rootGrid" Value="Collapsed"/>
</Trigger>
<Trigger Property="State" Value="AutoHide">
<Setter Property="Visibility" TargetName="pinnedGlyph" Value="Collapsed"/>
<Setter Property="Visibility" TargetName="unpinnedGlyph" Value="Visible"/>
</Trigger>
<Trigger Property="DockDirection" Value="Left">
<Setter Property="Grid.Column" TargetName="tabPanelGrid" Value="0" />
<Setter Property="Grid.Row" TargetName="tabPanelGrid" Value="1" />
<Setter Property="LayoutTransform" TargetName="PART_ItemsHost">
<Setter.Value>
<RotateTransform Angle="90" />
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="DockDirection" Value="Top">
<Setter Property="Grid.Column" TargetName="tabPanelGrid" Value="1" />
<Setter Property="Grid.Row" TargetName="tabPanelGrid" Value="0" />
</Trigger>
<Trigger Property="DockDirection" Value="Right">
<Setter Property="Grid.Column" TargetName="tabPanelGrid" Value="2" />
<Setter Property="Grid.Row" TargetName="tabPanelGrid" Value="1" />
<Setter Property="LayoutTransform" TargetName="PART_ItemsHost">
<Setter.Value>
<RotateTransform Angle="90" />
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>