【问题标题】:How to set shadow around grid in silverlight?如何在silverlight中的网格周围设置阴影?
【发布时间】:2012-01-04 06:32:07
【问题描述】:

我想在网格的四周设置阴影效果。

我正在使用控件的 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

如何设置所有方向的阴影?

【问题讨论】:

    标签: wpf silverlight shadow


    【解决方案1】:

    您必须将ShadowDepth 设置为0(阴影直接位于边框下方)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-11
      • 2014-07-06
      相关资源
      最近更新 更多