-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add overrides to Help with Obsoleting Compatibility.Layout #30058
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
Conversation
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.
Pull Request Overview
This PR adds protected overrides of OnSizeAllocated to maintain binary compatibility with existing consumers when Compatibility.Layout is removed.
- Introduces
OnSizeAllocated
overrides inTemplatedView
,ScrollView
, andContentPresenter
- Updates PublicAPI.Unshipped files to expose the new overrides
- Ensures future binary compatibility with libraries compiled against MAUI
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
File | Description |
---|---|
src/Controls/src/Core/TemplatedView/TemplatedView.cs | Added OnSizeAllocated override and compatibility comments |
src/Controls/src/Core/ScrollView/ScrollView.cs | Added OnSizeAllocated override and compatibility comments |
src/Controls/src/Core/ContentPresenter.cs | Added OnSizeAllocated override and compatibility comments |
src/Controls/src/Core/PublicAPI/*/PublicAPI.Unshipped.txt | Exposed the new overrides in all target frameworks' unshipped APIs |
Comments suppressed due to low confidence (1)
src/Controls/src/Core/TemplatedView/TemplatedView.cs:146
- There are no existing tests covering the new
OnSizeAllocated
override. Please add or update test cases in TestCases.Shared.Tests and TestCases.HostApp to verify this method is invoked correctly.
protected override void OnSizeAllocated(double width, double height)
d117d11
to
990cc0b
Compare
Description of Change
We had a few vendors test out the follow PR #29281 and they reported crashes on
OnSizeAllocated
.If we add these overrides to the base classes that we are keeping and then 3rd parties recompile, that will better prepare us down the road for hopefully getting to delete
Compatibility.Layout