Adding a BitmapEffect to a BitmapImage in WPF

Posted by Richard on Stack Overflow See other posts from Stack Overflow or by Richard
Published on 2010-05-15T20:58:13Z Indexed on 2010/05/15 21:04 UTC
Read the original article Hit count: 313

Filed under:
|
|
|

I have a png image of the earth which I'm trying to add an OuterGlowBitmapEffect to. I've done something similar with a simple Elipse, but BitmapImage doesn't seem to allow a BitmapEffect to be applied to it.

The following XAML isn't valid, but is there a valid way of doing this?

<BitmapImage UriSource="/Media/earth.png">
    <BitmapImage.BitmapEffect>
        <OuterGlowBitmapEffect GlowColor="Cyan" GlowSize="10" />
    </BitmapImage.BitmapEffect>
</BitmapImage>

The png in question is the top half of the earth and has a transparent background.

Thanks for your help.

© Stack Overflow or respective owner

Related posts about wpf

Related posts about bitmapeffect