Monday, December 19, 2011

#436 – Using a Drop Shadow with a Border

If you specify a DropShadowEffect for a Border, all elements within the border will get a drop shadow.

<Border Margin="10" BorderBrush="Black" BorderThickness="1">
    <Border.Effect>
        <DropShadowEffect/>
    </Border.Effect>
    <StackPanel Orientation="Vertical" Margin="5">
        <Label Content="Staying within borders"/>
        <Button Content="Do It"/>
    </StackPanel>
</Border>

436-001.png?w=630

Read more: 2,000 Things You Should Know About WPF
QR: http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://wpf.2000things.com/2011/11/23/436-using-a-drop-shadow-with-a-border/

Posted via email from Jasper-Net