-
Notifications
You must be signed in to change notification settings - Fork 787
fix(XamlRoot): Changed event incorrect Size value on device rotation #20472
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
base: master
Are you sure you want to change the base?
fix(XamlRoot): Changed event incorrect Size value on device rotation #20472
Conversation
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-20472/docs/index.html |
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-20472/wasm-skia-net9/index.html |
|
{ | ||
add | ||
{ | ||
if (RootElement is FrameworkElement fe) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems odd 🤔 - the screen size should directly affect XamlRoot
, so size changes should not have to depend on the root element. I would prefer to avoid this due to the fact that this part of the source should be aligned with WinUI which does not require this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is what would be the alternative/proper solution...
Right now, the XamlRoot.Size just routes to the VisualTree. But, VisualTree.Size changes are not raised back to XamlRoot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please provide me a scenario of when there is a VisualTree.Size
change which does not come from XamlRoot
so I can repro it locally? I think that such a situation should mean the routing of the source of the event should go through a different path instead in such case and there is a bug in the current sizing handling instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gave you the repro, any update on this?
GitHub Issue (If applicable): closes unoplatform/uno-private#1267
PR Type
What kind of change does this PR introduce?
What is the current behavior?
XamlRoot.Changed is fired, before its .Size is updated on device rotation.
What is the new behavior?
XamlRoot.Size origin updates will now in turn trigger a XamlRoot.Changed.
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Run
results.