[Windows] Allow to remove shadows at runtime#31452
Merged
jfversluis merged 2 commits intodotnet:inflight/currentfrom Sep 4, 2025
Merged
[Windows] Allow to remove shadows at runtime#31452jfversluis merged 2 commits intodotnet:inflight/currentfrom
jfversluis merged 2 commits intodotnet:inflight/currentfrom
Conversation
Contributor
|
Hey there @@MartyIX! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Member
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
MartyIX
commented
Sep 2, 2025
| partial void ShadowChanged() | ||
| { | ||
| if (HasShadow) | ||
| if (Shadow?.Paint is { }) |
Contributor
Author
There was a problem hiding this comment.
note: You can compare the new snapshot in this PR with the Android one: https://github.com/dotnet/maui/blob/main/src/Controls/tests/TestCases.Android.Tests/snapshots/android/Issue24414Test_5.png. There should be no shadow visible in Issue24414Test_5.png snapshots.
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
jsuarezruiz
approved these changes
Sep 3, 2025
Contributor
Author
|
It looks like the tests passed. The failing tests are related to Android. |
jfversluis
approved these changes
Sep 4, 2025
7583191 to
326ee2b
Compare
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
This PR attempts to address https://github.com/dotnet/maui/pull/18337/files#r2314339635. That is, it makes sure that shadow is removed from Border when
Border.Shadow = nullis assigned.I took inspiration in Android implementation:
maui/src/Core/src/Platform/Android/WrapperView.cs
Lines 61 to 110 in 718adb7
Test effect
My
src\Controls\tests\TestCases.WinUI.Tests\snapshots\windows\Issue24414Test_5.pngchanges like this: