Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set shadow around grid in silverlight?

I want to set Shadow effect around all sides of Grid.

I am using DropShadowEffect property of control to set shadow.

What i found is Direction property set shadow around control.

 <Grid x:Name="LayoutRoot" Background="#F4F2F1" Width="300" Height="300">
        <Grid.Effect>
        <DropShadowEffect BlurRadius="300"
                              Color="#877b77"
                              Opacity="100"
                              ShadowDepth="10"
                              Direction="0" />
        </Grid.Effect>
    </Grid>

output I got is

as follows

enter image description here

What I want to shadow to be appear on all sides of Grid .

I used this link to set direction property but its not giving me what i desire

How do i set shadow to all direction?

like image 367
pramod choudhari Avatar asked Jan 04 '12 06:01

pramod choudhari


1 Answers

You must set the ShadowDepth to 0 (shadow is directly underneath the border).

like image 70
Sebastian Edelmeier Avatar answered Sep 17 '22 15:09

Sebastian Edelmeier