-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Remove Compatibility.Layout as a subclass of all modern .NET MAUI controls #29281
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: net10.0
Are you sure you want to change the base?
Conversation
🚨 API change(s) detected @davidbritch FYI |
@albyrock87 can't add you as a reviewer, so tagging you like this. Would be great to get your perspective here! |
c4000a5
to
a3468ba
Compare
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.
Why are we keeping this class alive?
@@ -12,7 +12,7 @@ namespace Microsoft.Maui.Controls | |||
/// <include file="../../docs/Microsoft.Maui.Controls/RefreshView.xml" path="Type[@FullName='Microsoft.Maui.Controls.RefreshView']/Docs/*" /> | |||
[ContentProperty(nameof(Content))] | |||
[DebuggerDisplay("{GetDebuggerDisplay(), nq}")] | |||
public partial class RefreshView : ContentView, IElementConfiguration<RefreshView>, IRefreshView, ICommandElement | |||
public partial class RefreshView : ContentView, IElementConfiguration<RefreshView>, IRefreshView, ICommandElement, IClippedToBoundsElement |
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.
Why don't we implement IClippedToBoundsElement
directly in TemplatedView
so that this class gets it for free?
@@ -31,7 +28,7 @@ public Rect LayoutAreaOverride | |||
return; | |||
_layoutAreaOverride = value; | |||
// Dont invalidate here, we can relayout immediately since this only impacts our innards | |||
UpdateChildrenLayout(); | |||
InvalidateMeasure(); |
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.
I see this one is already obsolete in .NET9: can we remove the property completely?
[Obsolete]
public Rect LayoutAreaOverride
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
This PR removes
Compatibility.Layout
as a subclass of all modern .NET MAUI controls. It simplifies the control hierarchy and layout system by removingCompatibility.Layout
from the middle of the hierarchy.Additionally, does some minor code clean up and moving docs to inline.
Issues Fixed
Fixes #28736