Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mouse hover in WPF

Tags:

wpf

I'm facing a problem of implementing mouse hover event in WPF . First there is no such event in WPF , and second I need to make a similar event to be routed event. I mean, I have a global window , and I want to declare on it something like ButtonBase.MouseHover , so I'll handle this event each time I hover any button on the screen .

Any suggestion . Best regards Wasim ...

like image 506
Wasim Avatar asked Mar 02 '11 20:03

Wasim


3 Answers

How about MouseEnter ? Serves the same purpose :)

like image 52
Elad Katz Avatar answered Oct 13 '22 22:10

Elad Katz


The MouseHover function is split into two parts in WPF: MouseEnter and MouseLeave.

like image 30
CodeMouse92 Avatar answered Oct 13 '22 21:10

CodeMouse92


If you want to repeat event each ms you should use mouseMove

Or if you want to execute once when the mouse hover on the object...

you should use mouseEnter and MouseLeave

like image 27
عبد الحميد مرعي Avatar answered Oct 13 '22 21:10

عبد الحميد مرعي