UserControl Shadow

Posted by noober on Stack Overflow See other posts from Stack Overflow or by noober
Published on 2010-04-11T23:44:24Z Indexed on 2010/04/11 23:53 UTC
Read the original article Hit count: 373

Filed under:

Hello all,

I have a user control, MBControl. Here is the code:

<my:MBControl Name="MBControl" HorizontalAlignment="Center" VerticalAlignment="Center">
              <my:MBControl.BitmapEffect>
                <DropShadowBitmapEffect Color="Black" Direction="315"
                      Softness="0.5" ShadowDepth="10" Opacity="1" />
              </my:MBControl.BitmapEffect>
</my:MBControl>

The problem with the code is it seems like the shadow is applied to every child element of my user control. Or, possibly, it is dropped inside as well as outside -- the control surface is darker than without the shadow.

How could I fix this? I want the shadow being dropped outside only and not affecting the control surface.

© Stack Overflow or respective owner

Related posts about wpf