Question

How can i set mulitple effect like(shadow and blur) on same element.

Was it helpful?

Solution

I've just this minute done this. Credit to Greg Schechter for the idea.

You can nest Decorators like a Border and put a different Effect on each. I haven't tried with a large number of Effects yet but so far performance seems good.

Regards David

OTHER TIPS

It might be too late, but helps many people visiting for the answer.

Its possible to achieve multiple effects.

Just enclose the UIElement within another new UIElement(any element for that matter, like a stack panel for example). Then apply effects for both elements.

Two effects applied!

<StackPanel>
    <MediaElement Name="myMedia" Source="Fairytale Dream.wmv" >
        <MediaElement.Effect>
            <ShaderEffectLibrary:BloomEffect />
        </MediaElement.Effect>
    </MediaElement>
    <StackPanel.Effect>
        <ShaderEffectLibrary:ZoomBlurEffect />
    </StackPanel.Effect>
</StackPanel>

I think there is no need to combine effects here.

One of these effect will help you for simulating other effects like in case of DropShadow Effect, You could use BlurRadius for Blur Effect and ShadowDepth for shadow..

By using appropriate values you could simulate combination effects...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top