Dirkster99 / AvalonDock

Our own development branch of the well known WPF document docking library
Microsoft Public License
1.39k stars 318 forks source link

Auto-Hide Button Hides All Panes in a Group Instead of One #488

Open BlueprismWorld opened 1 week ago

BlueprismWorld commented 1 week ago

My layout includes multiple panes in both the left and right panels, and I've set the CanAutoHide property to True for each pane. However, I'm encountering an issue where clicking the auto-hide button on any pane within a LayoutAnchorablePaneGroup causes all the panes in that group to auto-hide together, instead of just the selected one.

Here's a simplified version of my XAML code:

<dock:DockingManager Grid.Row="0">
    <dock:DockingManager.Theme>
        <dock:Vs2013LightTheme/>
    </dock:DockingManager.Theme>

    <dock:LayoutRoot>
        <dock:LayoutPanel Orientation="Vertical">

            <!-- Main Content Area with Top Tabs -->
            <dock:LayoutPanel Orientation="Horizontal">
                <!-- Left Panel -->
                <dock:LayoutAnchorablePaneGroup DockWidth="200">
                    <dock:LayoutAnchorablePane>
                        <dock:LayoutAnchorable Title="Left Panel 1" CanClose="False" CanAutoHide="True">
                            <TextBlock Text="Hello"/>
                        </dock:LayoutAnchorable>
                        <dock:LayoutAnchorable Title="Left Panel 2" CanClose="False" CanAutoHide="True">
                            <TextBlock Text="Hello World"/>
                        </dock:LayoutAnchorable>
                        <dock:LayoutAnchorable Title="Left Panel 3" CanClose="False" CanAutoHide="True">
                        </dock:LayoutAnchorable>
                    </dock:LayoutAnchorablePane>
                </dock:LayoutAnchorablePaneGroup>

                <!-- Main Document Area -->
                <dock:LayoutDocumentPane>
                    <dock:LayoutDocument Title="Main Tab 1">
                        <TextBlock Text="Main tab1 content"/>
                    </dock:LayoutDocument>
                    <dock:LayoutDocument Title="Main Tab 2">
                        <TextBlock Text="Content of Main Tab 2" />
                    </dock:LayoutDocument>
                    <dock:LayoutDocument Title="Main Tab 3">
                        <TextBlock Text="Content of Main Tab 3" />
                    </dock:LayoutDocument>
                </dock:LayoutDocumentPane>

                <!-- Right Panel -->
                <dock:LayoutAnchorablePaneGroup DockWidth="200">
                    <dock:LayoutAnchorablePane>
                        <dock:LayoutAnchorable Title="Right Bottom Tab 1" CanClose="False" CanAutoHide="True">
                            <TextBlock Text="Content of Right Bottom Tab 1" />
                        </dock:LayoutAnchorable>
                        <dock:LayoutAnchorable Title="Right Bottom Tab 2" CanClose="False" CanAutoHide="True">
                            <TextBlock Text="Content of Right Bottom Tab 2" />
                        </dock:LayoutAnchorable>
                        <dock:LayoutAnchorable Title="Right Bottom Tab 3" CanClose="False" CanAutoHide="True">
                            <TextBlock Text="Content of Right Bottom Tab 3" />
                        </dock:LayoutAnchorable>
                    </dock:LayoutAnchorablePane>
                </dock:LayoutAnchorablePaneGroup>
            </dock:LayoutPanel>

            <!-- Bottom Panel with Full Width -->
            <dock:LayoutAnchorablePaneGroup Orientation="Horizontal" DockHeight="200">
                <dock:LayoutAnchorablePane>
                    <dock:LayoutAnchorable Title="Bottom Tab 1" CanClose="False" CanAutoHide="True">
                        <TextBlock Text="Content of Bottom Tab 1" />
                    </dock:LayoutAnchorable>
                    <dock:LayoutAnchorable Title="Bottom Tab 2" CanClose="False" CanAutoHide="True">
                        <TextBlock Text="Content of Bottom Tab 2" />
                    </dock:LayoutAnchorable>
                    <dock:LayoutAnchorable Title="Bottom Tab 3" CanClose="False" CanAutoHide="True">
                        <TextBlock Text="Content of Bottom Tab 3" />
                    </dock:LayoutAnchorable>
                </dock:LayoutAnchorablePane>
            </dock:LayoutAnchorablePaneGroup>

        </dock:LayoutPanel>
    </dock:LayoutRoot>
</dock:DockingManager>