Commit cc498be
authored
[Windows] Allow to remove shadows at runtime (#31452)
<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) 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 =
null` is assigned.
I took inspiration in Android implementation:
https://github.com/dotnet/maui/blob/718adb7f4f9ad83bcd3ead1627b6fba329837b2a/src/Core/src/Platform/Android/WrapperView.cs#L61-L110
### Test effect
My
`src\Controls\tests\TestCases.WinUI.Tests\snapshots\windows\Issue24414Test_5.png`
changes like this:
| Before | After |
|--------|--------|
| <img width="1010" height="729" alt="image"
src="https://github.com/user-attachments/assets/13e70b02-acab-4ef2-a4d0-f799d60748d2"
/> | <img width="1264" height="952" alt="image"
src="https://github.com/user-attachments/assets/865c4f68-ef05-4d25-a5c6-14c5d96a4872"
/>|File tree
2 files changed
+10
-3
lines changed- src
- Controls/tests/TestCases.WinUI.Tests/snapshots/windows
- Core/src/Platform/Windows
2 files changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
173 | 180 | | |
174 | 181 | | |
175 | 182 | | |
176 | | - | |
| 183 | + | |
177 | 184 | | |
178 | 185 | | |
179 | 186 | | |
| |||
0 commit comments