dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.03k stars 1.16k forks source link

WPF DropShaddowEffect consumes a lot of GPU resources #9300

Open vsfeedback opened 2 months ago

vsfeedback commented 2 months ago

This issue has been moved from a ticket on Developer Community.


I'm using an animation effect in my WPF window. GPU usage reaches 25%, sometimes reaching 50%-60% image

When I delete the DropShadowEffect in the code and run it again, the GPU usage is as follows

image image

Does anyone know how to solve it? Thank you.


Original Comments

Feedback Bot on 1/26/2024, 11:20 AM:

(private comment, text removed)

Feedback Bot on 5/7/2024, 11:38 AM:

(private comment, text removed)


Original Solutions

(no solutions)

control0forver commented 1 month ago

如果你需要模拟窗口阴影的话,我个人建议你可以使用一个元素作为窗口背景,并为其添加阴影效果,比如Rectangle。(当然,窗口必须是透明的)