-
Notifications
You must be signed in to change notification settings - Fork 369
Description
Describe the bug
I have noticed that the AttachedDropShadow messes up the shadow rendering when we combine different screen scalings with different scaled assets (scale-100, scale-125, ...).
This is how the shadow looks on my 100% scaled screen. It loads the scale-100 image.
This is what happens when I move the window to my surface laptop studio screen. It loads the scale-150 image and the shadow gets messed up.
In general, the moving from one screen to the other is to illustrate that the shadow does work at first and then gets messed up.
If you open the Window in the high scale screen, the shadow is messed up anyways, it doesn't need to be moved.
I am not sure if the cause is the screen scale or the PPI/DPI, I am no expert in this matter.
Regression
No response
Steps to reproduce
Important
Make sure you have 2 monitors with different scales connected to your machine
- Open Solution
- Run Project
- Move Window from scale screen to scale screen
- See the wrong shadow
Expected behavior
The correct shadow as is when there is only one monitor attached, or when only one asset scaling is present.
Screenshots
That's the code
<Grid Width="1000" Height="1000"
Background="White">
<Border x:Name="ShadowTarget"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<Image Width="300" Height="300"
Source="/Assets/Images/FolderImage.png">
<ui:Effects.Shadow>
<ui:AttachedDropShadow CastTo="{x:Bind ShadowTarget}"
BlurRadius="20"
Offset="0" Color="#00ff00"/>
</ui:Effects.Shadow>
</Image>
</Grid>IDE and version
VS 2022
IDE version
No response
Nuget packages
- CommunityToolkit.Common
- CommunityToolkit.Diagnostics
- CommunityToolkit.HighPerformance
- CommunityToolkit.Mvvm (aka MVVM Toolkit)
Nuget package version(s)
CommunityToolkit.Uwp.Extensions Version "8.2.250402"
Additional context
No response
Help us help you
Yes, but only if others can assist