我想在Grid的各个方面设置阴影效果.
我正在使用控件的DropShadowEffect属性来设置阴影.
我发现的是Direction属性设置控件周围的阴影.
<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>
我得到的输出是
如下
我希望阴影出现在Grid的各个方面.
I used this link to set direction property but its not giving me what i desire
如何将阴影设置为所有方向?
解决方法
您必须将ShadowDepth设置为0(阴影直接位于边框下方).
HTHSEBI