Silverlight 4:如何对一个元素应用多种效果?

发布于 2024-09-03 12:59:28 字数 108 浏览 1 评论 0原文

我们只能对一个元素应用一种效果。有什么办法可以同时对一个元素应用多种效果吗?像 DropShadowEffect 和 BlurEffect 一样?

谷歌并没有给我太大帮助。有什么建议吗?

We can apply only one effect to an element. Is there any way to apply multiple effects simultaneously to an element? like both DropShadowEffect as well as the BlurEffect ?

Google did not help me much. Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

怎言笑 2024-09-10 12:59:28

我曾经遇到过同样的问题;我必须对图像应用 BlurEffect 和 DropShadowEffect。
我所做的是这样的:我将 BlurEffect 应用于图像,并将该图像放入网格(其本身是无外观的)中,我可以在其上应用 DropShadowEffect:

<Grid>
    <Image ...>
        <Image.Effect>
            <BlurEffect ... />
        </Image.Effect>
    </Image>
    <Grid.Effect>
        <DropShadowEffect ... />
    </Grid.Effect>
</Grid>

干杯,Alex

I once experienced the same problem; I had to apply a BlurEffect as well as a DropShadowEffect to an image.
What I did was this: I applied the BlurEffect to the Image and put that Image into a Grid (which itself is lookless) onto which I could apply the DropShadowEffect:

<Grid>
    <Image ...>
        <Image.Effect>
            <BlurEffect ... />
        </Image.Effect>
    </Image>
    <Grid.Effect>
        <DropShadowEffect ... />
    </Grid.Effect>
</Grid>

Cheers, Alex

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文