Skip to content
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

Fix ProportionalStackPanel layout update when IsEmpty of its children changes #322

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

BAndysc
Copy link
Contributor

@BAndysc BAndysc commented Mar 8, 2024

IsEmpty and Proportion are ProportionalStackPanel's attached properties controlling how its children should be layouted. However, before the PR those properties were not attached to the Panel's Children. Instead, they were attached to the Panel's Children's Children's. Because of that, the panel couldn't observe for changes in those properties. The code had a lot of hacks to dig into the ContentPresenter's child to extract them. This PR fixes that by attaching those properties directly to the panel's children.

Fixes #321

(Additionally I've moved the attached properties to the ProportionalStackPanel from the ProportionalStackPanelSplitter, because logically that's where they belong to)

Before:

Screen.Recording.2024-03-10.at.16.56.27.mov

After:

Screen.Recording.2024-03-10.at.16.54.34.mov

@wieslawsoltes wieslawsoltes merged commit 8e0a5e9 into wieslawsoltes:master Mar 11, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After closing all documents, new document won't open
2 participants