Silverlight 4: How to apply multiple effects to an

2019-05-24 22:46发布

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?

1条回答
forever°为你锁心
2楼-- · 2019-05-24 23:22

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

查看更多
登录 后发表回答