views:

508

answers:

0

I have the following 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>

The item WIPadDock is going to endup being collapsed. When it gets collapsed it moves to the side of the window rather then the middle pane.

Is there a way to keep it to the side?

Here are some pictures to make it clearer:

Pane expanded

Pane hidden