Take the 2-minute tour ×

I'm new in WPF(c#). I need make a glow effect around image control using triggers. How can I do make glow effect on mouse-enter event? I want to use your answer i my style.

My effect is:

<DropShadowEffect x:Key="MyEffect" ShadowDepth="0" Color="Blue" Opacity="1" BlurRadius="20"/>

I see many links but they don't work.

share|improve this question
We can probably help you better if you showed us what you've tried already. Which 'links' did you try? Why didn't they work for you? –  Jordy Aug 23 '13 at 9:37

2 Answers 2

up vote 2 down vote accepted

To add glow to Image control you need to set Effect to your DropShadowEffect when IsMouseOver=True, something like this:

<Image Source="/WpfApplication1;component/myimage.png">
      <Style TargetType="{x:Type Image}">
               <Setter Property="Effect">
share|improve this answer

If you want to reuse your effect, you must capture IsMouseOver trigger and set Control.Effect property to what you have defined in your resources.

<Button Width="100" Content="Hello Glow" >
    <Trigger Property="Button.IsMouseOver" Value="True">
     <Setter Property="Button.Effect" Value="{StaticResource MyEffect}" />

for this, you must place you effect in recourses of current page/window/usercontrol

share|improve this answer
+ 1 Way to go for refactoring the code! –  aggietech Sep 24 at 14:37

Your Answer


