-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resize behavior of anchorable panels, the case when panels are not visible #37
Comments
I can confirm your video - this problem occurs consistently with all other test clients as well :-( The only time where this seems to work as expected:
Even using 2 toolwindows without a center document does not work as expected. This one Is a tough problem to solve. I can see the that the code LayoutGridControl.OnLayoutUpdated() is invoked when the window is resized but I am not sure, yet how this works, or what it is that does not work correctly when the window gets too small ... |
I have tested further focusing on the visual root and found that we also get correct sizing behavior if the toolwindow (LayoutAnchorable) is docked inside the LayoutPanelControl. So, it looks like the problem is somewhere in or below the visual tree of the LayoutAnchorSideControl since that seem to behave differently compared to the LayoutPanelControl (which hosts the document root and seems to work as expected)? |
Unfortunately I'm not able to reproduce the correct sizing behavior. Could you please provide a demo / video / code sample? |
Yes, you are right - I should have posted more details. So, here are the test cases I was talking about: The attached test cases
include screenshot and layouts that I produced with the MLibTest project. in the LayoutInitializer.cs file (see documentation here). The tests that work for me are 2FloatingTools and 2Tools, while 2Tools_Doc works only with the lower tool window. The first ContentPresenter below the DockingManager (in the VisualTree) is the DockingManager.LayoutRootPanel. So, it seems like the resizing works es expected (2Tools) if toolwindows (LayoutAnchorables) are arranged here without a document. And things do not work if both document and tool window are arranged in a horizontal line. |
Not sure if thats getting us anywhere but I have added an extended console dump branch to also output the ActualSize, ActualWidth via ...but to my surprise, the width data does not change, no matter how much I resize the window or its content. Also strange, the content below the These actual size values are hard to find because the properties are implemented with double ILayoutPositionableElementWithActualSize.ActualWidth which makes them invisible inside the implementing class :-( MainWindow ActualSize 08-Jun-19 13:20:02,523.2,550 Update Inital ValuesMainWindow 08-Jun-19 17:11:34 | ActualSize 800,550 Values after resizing with to be too small for tool windowMainWindow 08-Jun-19 17:12:11 | ActualSize 402.8,550 |
Thanks, I checked these cases. I see that you docked AncorablePanels into DocumentGroupPanel. In such case the LayoutAnchorablePanel will have relative size (new GridLength(1, GridUnitType.Star)) and it will have a little bit another behavior. The size of LayoutAnchorablePanel will change when changes the size of parent panel.
|
Hi, I've tested your MLib_Test.zip and it behaves a lot more like what you'd expect :-) I have continued to invistigate this problem and saw in the last commit in my branch that the Resizing in the Measure and ArrangeMeasure override is not handled as expected since the control does not change its size even though its clearly been given less size than it wants to occupy. I guess, the cause of the problem is what you describe above about the GridUnitType parameter. So, my idea for solving this problem was a Level-Order Visual-Tree walk that would ensure that all Children of a given Panel are minimized as required. Then, when all children at their minimal size, it might be best to not let the user minimize the window further? Which could be implemented via SizeChanged in My problem is just that I have already spent a lot of time testing and am most likely not able to do a lot more this week :-( I also have too look deeper into the details of custom Panel control implementation since I have not done this, yet, but maybe my testing and your developments already gets us somewhere with this? Anyway, it would be realy cool if you could commit this draft into a branch in your repository, this way, I could see how your doing the drafted solution and maybe be able to better understand the requirements for a more general solution(?). I will stop testing or giving feedback to this since you seem to be getting very far with this already :-) cool, please let me know if there is anything I can do to help? Thanks Dirk |
…els are not visible
Hi, I've commited the changes: https://github.com/scdmitryvodich/AvalonDock/tree/AnchorablePanelSizingBehavior It works stable, I didn't found any significant issues. Best regards, |
…els are not visible
I have tested your branch https://github.com/scdmitryvodich/AvalonDock/tree/AnchorablePanelSizingBehavior and it is stable indeed :-) good work I have tested the cases listed here. The only minor issues I found are related to the "expected visual studio" behavior which is basically that it can restore tool window sizes even after:
I had no time to analyze your solution, yet, so I don't fully understand it at the moment and will therfore no be able to make much useful suggestions other than guessing - but we can handle these minor issues What do you think about the test steps I've marked with Issue in the page linked above? |
…els are not visible
…els are not visible
I've fixed issues related to Save/Load layout config and Auto Hide. But not sure about Hide issue. Seems that it's not depends from my changes, it's also reproduced on master. |
…els are not visible
#37 Fixed sizing behavior of anchorable panels
Otherwise, it appears that you fixed all issues that I previously found - awesome 🥇 👍 I am sure this will be the best AvalonDock release in a long time thanks to your support, |
We have a case when document panel becomes hidden outside of the window.
Please, check the attached video for more details:
AvalonDock_fixedAnchorablePanelBehavior.zip
As result: the document panel start to decreasing, after it reach DockMinValue, the tool panel in right FileStats2 start hiding under the window border.
Is there any way if we can make behavior of docked anchorable window in same way as in VisualStudio for example (see video).
Here in first order decrease Document Panel and then start to decreasing the tool panels.
The text was updated successfully, but these errors were encountered: