Dirkster99 / AvalonDock

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

How to keep order of LayoutAnchorable after setting IsVisible #476

Open xiazeyi opened 6 months ago

xiazeyi commented 6 months ago

Given several LayoutAnchorables in LayoutDocumentPane (Using laOne, laTwo, laThree to represent them), the original order of them is: laOne, laTwo, laThree. Set their IsVisible to False one by one from laOne to laThree, they are all hidden. Then set their IsVisible to True one by one from laOne to laThree, they are all shown, but the order is changed to: laThree, laTwo, laOne. Their PreviousContainerIndex is all 0 after they are hidden one by one, as a result the order is changed after inserting them back to LayoutDocumentPane to show them. Is there a way to keep the order of them, such as ordering by ContentId? Thanks.

xiazeyi commented 6 months ago

I can fix it by specifying a customized DockingManager.LayoutUpdateStrategy, but same issue happens after floating them one by one and then docking them back.