2.0 이전의 AvalonDock 버전에서 원하는대로 할 수있는 속성이있었습니다. 그것은 당신이 AvalonDock을 전체 DockingManager 스타일을 재 작성하거나 수정해야 하나, 2.0 DocumentPane.ShowHeader
했다.
나는 이슈 트래커에서 이것에 대한 문제를 생성하고, 다시 기능을해야 할 다운로드 할 수있는 패치를 부착.
이 패치는 이전 버전과의 호환성을 향상시키고, 최신 버전에 적용 할 때 약간의 조정이 필요합니다. 또한, 이후 출시 된 새로운 테마는 처리하지 않습니다.
http://avalondock.codeplex.com/workitem/15626
패치 :
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"/>