Glow effect on MouseEnter WPF

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.


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}">
            <Trigger Property="IsMouseOver" Value="True">
               <Setter Property="Effect">
                     <DropShadowEffect ShadowDepth="0" Color="Blue" Opacity="1" BlurRadius="20"/>

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

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

Need Your Help

WebClient + HTTPS Issues

c# https webclient

I am currently integrating with a system created by a 3rd party. This system requires me to send a request using XML/HTTPS. The 3rd party send me the certificate and I installed it

Why doesn't .find() work with urllib.request.urlopen() in python 3?

python python-3.x

Trying to transition from urllib in python 2 to python 3. I can output the html source using .urlopen() but I can't index it using .find() method.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.