Client Pay Portal
 sliverlight

How to Add a Drop Shadow to All Buttons in a Silverlight Application

Expression Blend allows developers to quickly style all controls within an application using styles. These styles define color, padding/spacing, and the overall look and feel of the control. Another nice feature is the ability to add effects to all controls of a particular type. Here’s a quick way to add a drop shadow to all buttons within an application.
 
            <Style TargetType="Button">
                <Setter Property="Cursor" Value="Hand" />
                <Setter Property="Foreground" Value="#FFFFFFFF"/>
                <Setter Property="Padding" Value="5"/>
                <Setter Property="BorderThickness" Value="1"/>
                <Setter Property="Effect">
                    <Setter.Value>
                        <DropShadowEffect Direction="270" Opacity="0.35" ShadowDepth="3"/>
                    </Setter.Value>
                </Setter>

                <Setter Property="BorderBrush">


The “Effect” Setter Property is used to add the drop shadow to every button within the app. Its properties allow you to customize the depth, opacity, and any other DropShadow property. You can use this same process to apply other effects to controls and give you app a clean and consistent look/feel.

Author

Wiz E. Wig, Mascot & Director of Magic
Wiz E. Wig

Director of Magic