Friday, October 16, 2009

Nice Drop Shadow Border in XAML

I was working with Silverlight 3 and created this drop shadow border. Enjoy.

<Style x:Key="DropShadow" TargetType="Border">
    <Setter Property="Background" Value="WhiteSmoke" />
    <Setter Property="CornerRadius" Value="5" />
    <Setter Property="BorderThickness" Value="1,1,4,4" />
    <Setter Property="Margin" Value="10" />
    <Setter Property="Padding" Value="6" />
    <Setter Property="BorderBrush">
        <Setter.Value>
            <LinearGradientBrush>
                <GradientStop Color="#ccc" Offset="0" />
                <GradientStop Color="#ddd" Offset="1" />
            </LinearGradientBrush>
        </Setter.Value>
    </Setter>
</Style>

2 comments:

Anonymous said...

Thanks for sharing!

Azmat Ahmed said...

amazing job.