Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 10 additions & 3 deletions src/Core/src/Platform/Windows/WrapperView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,20 @@ void UpdateBorder()

partial void ShadowChanged()
{
if (HasShadow)
if (Shadow?.Paint is { })
Copy link
Contributor Author

@MartyIX MartyIX Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

{
UpdateShadowAsync().FireAndForget(IPlatformApplication.Current?.Services?.CreateLogger(nameof(WrapperView)));
if (HasShadow)
{
UpdateShadowAsync().FireAndForget(IPlatformApplication.Current?.Services?.CreateLogger(nameof(WrapperView)));
}
else
{
CreateShadowAsync().FireAndForget(IPlatformApplication.Current?.Services?.CreateLogger(nameof(WrapperView)));
}
}
else
{
CreateShadowAsync().FireAndForget(IPlatformApplication.Current?.Services?.CreateLogger(nameof(WrapperView)));
DisposeShadow();
}
}

Expand Down