WPF drop shadow

Posted by Petezah on Stack Overflow See other posts from Stack Overflow or by Petezah
Published on 2010-05-14T00:03:46Z Indexed on 2010/05/14 0:14 UTC
Read the original article Hit count: 715

Filed under:
|

Currently I'm making something in WPF that has a border that contains a grid and other controls. The problem I'm facing is that whenever I set the Border.Effect property to a drop shadow effect every control contained in the border now has a drop shadow. Is there a way to set the shadow just to the border and not every control contained in the border?

Here is a short example of my code:

<Grid>
 <Border Margin="68,67,60,67" BorderBrush="Black" BorderThickness="1" CornerRadius="10">
  <Border.Effect>
   <DropShadowEffect/>
  </Border.Effect>
  <Rectangle Fill="White" Stroke="Black" Margin="37,89,118,98" />
 </Border>
</Grid>

© Stack Overflow or respective owner

Related posts about wpf

Related posts about dropshadow