WPF DropShadowEffect Causing Blurriness

纵饮孤独 提交于 2019-11-30 12:14:24

What I do for this kind of scenarios is putting a Background Rectangle and apply the Blur effect just for that, so that the real content will be free from the effect, which in turn increases the performance. Because when you apply the effect to a visual all the subsequent children are also getting the effect applied, which makes the perf and looks gets bad. Try the below

 <Grid>
  <Rectangle ....>
  <Rectangle.Effect>
     <DropShadowEffect />
  </Rectangle.Effect>
 </Rectangle>
....Your content ...
</Grid>

There is a RendingQuality you can use to fix this issue. The default is biased for performance. Just do this:

<DropShadowEffect Color="#FFFD1E1E" ShadowDepth="0" RenderingBias="Quality"/>
Asha

I'm not sure but try setting the BlurRadious for the Image.Effects to 0 by default it's 5 and see if it will help?

<Image.Effect>
    <DropShadowEffect BlurRadius="0"/>
</Image.Effect>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!