我有以下 AvalonDock XAML:
<ad:DockingManager Name="DockManager" Background="White">
<ad:ResizingPanel Orientation="Horizontal">
<ad:DockablePane ad:ResizingPanel.ResizeWidth="300" Name="LeftSideBar" SelectedIndex="0">
<ad:DockableContent Name="Connection" Title="Connection" IsCloseable="False">
// Some Stuff
</ad:DockableContent>
<ad:DockableContent Name="WIQuery" Title="WI Query" Focusable="True" IsCloseable="False">
//Some more stuff
</ad:DockableContent>
</ad:DockablePane>
<!--MIDDLE SECTION-->
<ad:ResizingPanel Orientation="Vertical" MinWidth="50" MinHeight="50">
<ad:ResizingPanel Orientation="Horizontal" >
<ad:DocumentPane>
<ad:DocumentContent Title="Query Results" IsCloseable="False">
<ListBox ScrollViewer.HorizontalScrollBarVisibility="Disabled" Button.Click="PickWorkItem_Click" SelectionMode="Multiple" ItemTemplate="{StaticResource RowTemplate}" Name="lstQueryResults" SelectionChanged="lstQueryResults_SelectionChanged" >
<ListBox.Resources>
<Style TargetType="{x:Type ListBoxItem}">
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black"/>
<SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="Black"/>
</Style.Resources>
<Style.Triggers>
<DataTrigger Value="True">
<DataTrigger.Binding>
<MultiBinding Converter="{StaticResource DisableWorkItemConverter}">
<Binding ElementName="MainForm" Path="PickedWorkItemID"/>
<Binding Path="WorkItemForColumn.Id"/>
</MultiBinding>
</DataTrigger.Binding>
<Setter Property="IsEnabled" Value="False"/>
<Setter Property="loc:Main.IsCurrentItemEnabledChanged" Value="True"/>
</DataTrigger>
</Style.Triggers>
</Style>
</ListBox.Resources>
</ListBox>
</ad:DocumentContent>
</ad:DocumentPane>
<ad:DockablePane ad:ResizingPanel.ResizeWidth="120" >
<ad:DockableContent Title="Query Options" IsCloseable="False" HideOnClose="True">
<CheckBox Margin="5" IsChecked="{Binding Path=VisibilityOfWorkItemColumnTitles, Converter={StaticResource VisibilityToBooleanConverter}}" >Show Titles</CheckBox>
</ad:DockableContent>
</ad:DockablePane>
</ad:ResizingPanel>
<ad:DockablePane>
<ad:DockableContent x:Name="WIPadDock" Title="WorkItem Pad" IsCloseable="False">
<ScrollViewer x:Name="WIPadCntr" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
<dot:ZipperPanel ChildrenPerRow="4" SpacingX="120" SpacingY="10" Name="CanvasPad" RenderTransformOrigin="0,0"></dot:ZipperPanel>
</ScrollViewer>
</ad:DockableContent>
</ad:DockablePane>
</ad:ResizingPanel>
<!--RIGHT SECTION-->
<ad:DockablePane MinWidth="50" MinHeight="50" ad:ResizingPanel.ResizeWidth="300" Name="RightSideBar" SelectedIndex="1">
<ad:DockableContent Title="Add Links" Name="tabAddLinks" IsCloseable="False">
</ad:DockableContent>
</ad:DockablePane>
</ad:ResizingPanel>
</ad:DockingManager>
WIPadDock 项目最终将被折叠。当它被折叠时,它会移动到窗口的一侧,而不是中间的窗格。
有没有办法让它保持在一边?
为了更清楚,这里有一些图片:
窗格扩展 http://img215.imageshack.us/img215/8725/avalondock1.png
窗格隐藏 http://img215.imageshack.us/img215/2763/avalondock2.png