tags:

views:

32

answers:

2

Hi,

I'm working on a c# wpf app with a custom window (allowtransparency = true, resize = none, window style = none).

Now I would like to add drop shadow similar to the zune pc software. I read up on this and the included dropshadoweffect is not covering all angles of my window and it is said to kill performance.

I want to implement it like this: I add a margin to my layout grid which I programmatically remove when maximizing the app.

What is the best way to add a drop shadow which can be applied to a grid, which doesn't kill performance and drops shadow in all directions?

+1  A: 

DropShadowEffect doesn't "kill performance"... it is rendered using hardware acceleration, and rendering a drop shadow on a window is not a big deal for current GPUs. You're probably confusing with DropShadowBitmapEffect, which is software rendered. Anyway all BitmapEffects were made obsolete in 3.5 SP1 and don't work at all in 4.0, only Effects can be used now

Thomas Levesque
So I use the dropshadoweffect on my grid then? How can I get it to drop shadow in all directions or do I have to apply multiple effects..?
internetmw
A: 

Direction of -75, ShadowDepth of 2 and BlurRadius of 27 helped for me.

Best way is to use blend for doing these.

HTH

Avatar