You can add a drop shadow to a reflection using the standard Silverlight drop shadow effect. In this topic, you will add the drop shadow effect in Blend, in XAML, and in code.
At Design Time in Blend
To use the drop shadow effect, complete the following steps:
Click Add another item.
The Select Object dialog box opens.
At Design Time in Blend
To use the drop shadow effect, complete the following steps:
XAML Copy Code <c1ext:C1Reflector.ReflectionEffects> <DropShadowEffect BlurRadius="7 Opacity="0.95" ShadowDepth="8" Direction="180"/> </c1ext:C1Reflector.ReflectionEffects>
In Code
To use the drop shadow effect, complete the following steps:
Visual Basic Copy Code Imports System.Windows.Media.Effects;
C# Copy Codeusing System.Windows.Media.Effects;
Visual Basic Copy Code 'Create the DropShadowEffect object and set its properties Dim newDropShadowEffect As New DropShadowEffect() newDropShadowEffect.BlurRadius = 7 newDropShadowEffect.Direction = 180 newDropShadowEffect.Opacity = 95 newDropShadowEffect.ShadowDepth = 8 'Add the DropShadowEffect object to the C1Reflector control C1Reflector1.ReflectionEffects.Add(newDropShadowEffect)
C# Copy Code //Create the DropShadowEffect object and set its properties DropShadowEffect newDropShadowEffect = new DropShadowEffect(); newDropShadowEffect.BlurRadius = 7; newDropShadowEffect.Direction = 180; newDropShadowEffect.Opacity = 95; newDropShadowEffect.ShadowDepth = 8; //Add the DropShadowEffect object to the C1Reflector control C1Reflector1.ReflectionEffects.Add(newDropShadowEffect);
This Topic Illustrates the Following:
When you run the project, the C1Reflector control and its content will resemble the following image: