AvalonDock autohide to panel side instead of window

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 WIPadDock element will be destroyed. When it collapses, it moves toward the window, not the middle panel.

Is there any way to keep it out of the way?

Here are a few photos to make them clearer:

Expanded panel http://img215.imageshack.us/img215/8725/avalondock1.png

hidden panel http://img215.imageshack.us/img215/2763/avalondock2.png

+3
source share

Source: https://habr.com/ru/post/1727666/


All Articles