There was a property to do just what you want in AvalonDock versions prior to 2.0. It was DocumentPane.ShowHeader
In 2.0, you either have to rewrite the entire DockingManager Style, or modify AvalonDock.
I created an issue for this in the issue tracker, and attached a patch that you can download to have to feature again.
This patch was made against a prior version, and might need some tweaking if you apply it to current version. Also, it does not handle new themes that were released since then.
http://avalondock.codeplex.com/workitem/15626
Patch:
Index: AvalonDock/AvalonDock.Theme.VS2010/Theme.xaml
===================================================================
--- AvalonDock/AvalonDock.Theme.VS2010/Theme.xaml (revision 96146)
+++ AvalonDock/AvalonDock.Theme.VS2010/Theme.xaml (working copy)
@@ -93,7 +93,9 @@
</Grid.RowDefinitions>
<!--Following border is required to catch mouse events-->
<Border Background="Transparent" Grid.RowSpan="2"/>
- <Grid Panel.ZIndex="1">
+ <Grid Grid.Row="0"
+ Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type avalonDockControls:LayoutDocumentPaneControl}}, Path=Model.ShowHeader, Converter={StaticResource BoolToVisibilityConverter}}"
+ Panel.ZIndex="1">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
Index: AvalonDock/AvalonDock.Themes.Aero/Theme.xaml
===================================================================
--- AvalonDock/AvalonDock.Themes.Aero/Theme.xaml (revision 96146)
+++ AvalonDock/AvalonDock.Themes.Aero/Theme.xaml (working copy)
@@ -38,7 +38,9 @@
</Grid.RowDefinitions>
<!--Following border is required to catch mouse events-->
<Border Background="Transparent" Grid.RowSpan="2"/>
- <Grid Panel.ZIndex="1" >
+ <Grid Grid.Row="0"
+ Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type avalonDockControls:LayoutDocumentPaneControl}}, Path=Model.ShowHeader, Converter={StaticResource BoolToVisibilityConverter}}"
+ Panel.ZIndex="1" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
Index: AvalonDock/AvalonDock/Layout/LayoutDocumentPane.cs
===================================================================
--- AvalonDock/AvalonDock/Layout/LayoutDocumentPane.cs (revision 96146)
+++ AvalonDock/AvalonDock/Layout/LayoutDocumentPane.cs (working copy)
@@ -49,6 +49,27 @@
return true;
}
+ #region ShowHeader
+ private bool _showHeader = true;
+
+ public bool ShowHeader
+ {
+ get
+ {
+ return _showHeader;
+ }
+ set
+ {
+ if (value != _showHeader)
+ {
+ this._showHeader = value;
+ RaisePropertyChanged("ShowHeader");
+ }
+ }
+ }
+
+ #endregion
+
#region SelectedContentIndex
private int _selectedIndex = -1;
Index: AvalonDock/AvalonDock/Themes/generic.xaml
===================================================================
--- AvalonDock/AvalonDock/Themes/generic.xaml (revision 96146)
+++ AvalonDock/AvalonDock/Themes/generic.xaml (working copy)
@@ -28,7 +28,9 @@
</Grid.RowDefinitions>
<!--Following border is required to catch mouse events-->
<Border Background="Transparent" Grid.RowSpan="2"/>
- <Grid Panel.ZIndex="1">
+ <Grid Grid.Row="0"
+ Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type avalonDockControls:LayoutDocumentPaneControl}}, Path=Model.ShowHeader, Converter={StaticResource BoolToVisibilityConverter}}"
+ Panel.ZIndex="1">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>