xceedsoftware / wpftoolkit

All the controls missing in WPF. Over 1 million downloads.
Other
3.89k stars 877 forks source link

AvalonDock auto-hides, when CanAutoHide=false #1596

Open gertsiuk opened 4 years ago

gertsiuk commented 4 years ago

I have two LayoutAnchorable in one LayoutAnchorablePane, when one of them is CanAutoHide=false, another - CanAutoHide=true. The code is next:

                <avalonDock:LayoutAnchorablePane>
                    <avalonDock:LayoutAnchorable ContentId="toolWindow3" Title="Tool Window 3" Hiding="OnToolWindow1Hiding" CanAutoHide="False" CanClose="False" CanHide="False" CanFloat="False">
                        <!-- Content -->
                    </avalonDock:LayoutAnchorable>
                </avalonDock:LayoutAnchorablePane>
                <avalonDock:LayoutAnchorablePane>
                    <avalonDock:LayoutAnchorable ContentId="toolWindow1" Title="Tool Window 1" CanAutoHide="False" CanClose="False" CanHide="False" CanFloat="False">
                        <!-- Content -->
                    </avalonDock:LayoutAnchorable>
                </avalonDock:LayoutAnchorablePane>

Commonly, it has next UI view: image image

When I click on the "Auto-Hide" button on first layout - two Layouts in Pane have the same behavior and act like: image

It looks like a bug in AvalonDock, but is there a correct settings or bypass(in case if it is a bug)?

XceedBoucherS commented 4 years ago

Hi,

Which version of the Toolkit are you using ? Can you submit your sample so we can test your situation ? Thank you

gertsiuk commented 4 years ago

@XceedBoucherS , I tried AvalonDock 2.0.2000.0 and 3.4.0.0.

A behavior is the same. Code:

<Window x:Class="AvalonDock.MVVMTestApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:avalonDock="http://schemas.xceed.com/wpf/xaml/avalondock"
        xmlns:local="clr-namespace:AvalonDock.MVVMTestApp"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <avalonDock:DockingManager x:Name="dockManager">
            <avalonDock:LayoutRoot>
                <avalonDock:LayoutPanel Orientation="Vertical">
                    <avalonDock:LayoutAnchorablePane Name="ToolsPane" DockHeight="150" >
                        <avalonDock:LayoutAnchorable x:Name="pane" Content="ds"/>
                        <avalonDock:LayoutAnchorable x:Name="pane3" Content="dsdf" CanFloat="False" CanAutoHide="False" CanClose="False" CanHide="False"/>
                    </avalonDock:LayoutAnchorablePane>
                </avalonDock:LayoutPanel>
            </avalonDock:LayoutRoot>
        </avalonDock:DockingManager>
    </Grid>
</Window>
XceedBoucherS commented 4 years ago

Hi, Can you reproduce in the latest v4.0 version. Also are you using a specific theme ? Thank you.

gertsiuk commented 4 years ago

@XceedBoucherS , I've just tried to reproduce it on v4.0, and the bug is stable. I tried with both specific, and without specific theme - behavior is the same.

Let me provide you a VS Project, which shows a bug. githubexample.zip

Just run it, and click "auto-hide" on the first dock. The second dock will go after it, which is wrong.

XceedBoucherS commented 4 years ago

Hi, Thanks for the information. we knew about this issue, but its now clear it has to be fixed. The fix will be included in v4.1. Thank you.

gertsiuk commented 4 years ago

@XceedBoucherS , thank you for the information! I would be grateful if you paid your attention to this ticket https://github.com/xceedsoftware/wpftoolkit/issues/1606...