Silverlight 4:如何对元素应用多种效果? [英] Silverlight 4: How to apply multiple effects to an element?

查看:72
本文介绍了Silverlight 4:如何对元素应用多种效果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们只能对一个元素应用一种效果.有什么办法可以同时对一个元素应用多种效果?就像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对我没有太大帮助.有什么建议吗?

Google did not help me much. Any suggestions?

推荐答案

我曾经遇到过同样的问题;我必须对图像应用BlurEffect和DropShadowEffect. 我所做的是:我对图像应用了BlurEffect并将该图像放入一个网格(它本身是看不到的)中,可以在其上应用DropShadowEffect:

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>

干杯,亚历克斯

这篇关于Silverlight 4:如何对元素应用多种效果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆