Further remove dependency of Compatibility.Layout on all modern .NET MAUI controls#29281
Closed
jfversluis wants to merge 14 commits intonet10.0from
Closed
Further remove dependency of Compatibility.Layout on all modern .NET MAUI controls#29281jfversluis wants to merge 14 commits intonet10.0from
jfversluis wants to merge 14 commits intonet10.0from
Conversation
Member
Author
|
@albyrock87 can't add you as a reviewer, so tagging you like this. Would be great to get your perspective here! |
jfversluis
commented
May 1, 2025
jsuarezruiz
previously approved these changes
May 2, 2025
c4000a5 to
a3468ba
Compare
albyrock87
reviewed
May 2, 2025
jsuarezruiz
reviewed
May 5, 2025
Contributor
jsuarezruiz
left a comment
There was a problem hiding this comment.
C:\a\_work\1\s\src\Controls\tests\TestCases.HostApp\Issues\Bugzilla\Bugzilla36788.cs(68,5): error CS0117: 'ContentView' does not contain a definition for 'IsClippedToBounds' [C:\a\_work\1\s\src\Controls\tests\TestCases.HostApp\Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
C:\a\_work\1\s\src\Compatibility\Core\src\Windows\RadioButtonRenderer.cs(59,35): error CS0117: 'RadioButton' does not contain a definition for 'PaddingProperty' [C:\a\_work\1\s\src\Compatibility\Core\src\Compatibility.csproj::TargetFramework=net10.0-windows10.0.20348.0]
C:\a\_work\1\s\src\Compatibility\Core\src\Windows\RadioButtonRenderer.cs(59,97): error CS0117: 'RadioButton' does not contain a definition for 'PaddingProperty' [C:\a\_work\1\s\src\Compatibility\Core\src\Compatibility.csproj::TargetFramework=net10.0-windows10.0.20348.0]
C:\a\_work\1\s\src\Compatibility\Core\src\Windows\RadioButtonRenderer.cs(112,43): error CS0117: 'RadioButton' does not contain a definition for 'PaddingProperty' [C:\a\_work\1\s\src\Compatibility\Core\src\Compatibility.csproj::TargetFramework=net10.0-windows10.0.20348.0]
33 Error(s)
a3468ba to
985ff86
Compare
Member
|
I did a basic test with the nuget from this PR against MCT version 12.0 I was still able to use the |
PureWeen
previously requested changes
Jun 10, 2025
MartyIX
reviewed
Jun 11, 2025
| /// <summary>The children contained in this layout.</summary> | ||
| /// <remarks>For internal use only. This API can be changed or removed without notice at any time.</remarks> | ||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public IReadOnlyList<Element> Children => LogicalChildrenInternal; |
Contributor
There was a problem hiding this comment.
Isn't it a good opportunity to enable #nullable for modified properties? It's always so frustrating to guess if something can or cannot be null.
bc05887 to
a5780b2
Compare
fa29135 to
58b2dd0
Compare
Member
|
/rebase |
f143719 to
647926d
Compare
0f2420c to
53fb5cf
Compare
Copilot AI
added a commit
that referenced
this pull request
Jul 17, 2025
…d modernize layout system Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
PureWeen
added a commit
that referenced
this pull request
Jul 17, 2025
…d modernize layout system Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
# Conflicts: # src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt # src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt # src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt # src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt # src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt # src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt
…view to measure/layout correctly
53fb5cf to
c4439d0
Compare
Member
|
Moved PR to here |
PureWeen
added a commit
that referenced
this pull request
Jul 17, 2025
…d modernize layout system Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
PureWeen
pushed a commit
that referenced
this pull request
Jul 17, 2025
…d modernize layout system Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com> # Conflicts: # src/Compatibility/Core/src/iOS/Renderers/CarouselPageRenderer.cs # src/Controls/src/Core/Platform/Windows/FormsListView.cs
PureWeen
pushed a commit
that referenced
this pull request
Jul 17, 2025
…d modernize layout system Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com> # Conflicts: # src/Compatibility/Core/src/iOS/Renderers/CarouselPageRenderer.cs # src/Controls/src/Core/Platform/Windows/FormsListView.cs
PureWeen
added a commit
that referenced
this pull request
Jul 18, 2025
…MAUI controls (#30672) * Initial plan * Copy all changes from PR #29281 - Remove CarouselPage dependencies and modernize layout system Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com> # Conflicts: # src/Compatibility/Core/src/iOS/Renderers/CarouselPageRenderer.cs # src/Controls/src/Core/Platform/Windows/FormsListView.cs * - Fix Compatibility # Conflicts: # src/Controls/src/Core/ClippedToBoundsElement.cs # src/Controls/src/Core/ContentPresenter.cs # src/Controls/src/Core/IClippedToBoundsElement.cs # src/Controls/src/Core/InputTransparentContainerElement.cs # Conflicts: # src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt # src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt # src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt # src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt # src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt # src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt * Update ScrollViewHandler.Android.cs * - fix compat tests * - fixes based on comments * - address comments and fix txt file * no need for this * - remove redundant if statements * - fix unshipped files * - fix windows --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Shane Neuville <shneuvil@microsoft.com> Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com> Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Ideally we will eventually be able to remove
Compatibility.Layoutbut we are still in a state where if users have overridden certain methods or are calling some properties that are still on Compatibility.Layout then the binary isn't compatible. This PR copies all of the public APIs to the subclasses so whenever users override or call those methods/properties on the base class the IL will resolved to the derived type vs theCompatibility.LayoutWe have also implemented a property that will detect if the
Compatibility.Layoutis being used with any of our modern layouts. If it is then we just bypass all of theCompatibility.Layoutlogic so that it doesn't interfere with performance or the MAUI logicIssues Fixed
Fixes #28736