Dirkster99 / AvalonDock

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

Adjust GetSide to allow for multiple anchorable panes on the left or top #486

Open mpondo opened 5 months ago

mpondo commented 5 months ago

When the auto hide button is clicked for an anchorable window, the GetSide method determines the side it should use. The existing logic requires that it be the first child in order to go to the left side.

Our users are finding this behavior confusing. When they dock multiple anchorable windows side-by-side on the left, they expect all of them to go to the left side when clicking the auto hide. However, some of them will shift to the right. The following video shows this behavior in the TestApp:

https://github.com/Dirkster99/AvalonDock/assets/565423/fced71de-8540-4d7f-800b-fcba7a4c73e2

This change expands the logic for determining the left (or top side) to include any anchorable pane that is at the beginning of the children collection, rather than just the first child. The following video shows the adjusted behavior in the TestApp:

https://github.com/Dirkster99/AvalonDock/assets/565423/77de0a9a-2a01-4644-8a75-d25088d0310e