开发者

Silverlight 4: How to apply multiple effects to an element?

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 m开发者_C百科uch. Any suggestions?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜