Click here to Skip to main content
15,921,062 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
----
How can add mouse event in c# wpf such as mouse move over button
----------
Thanxxxxx
Posted

1 solution

There is no MouseHover event in WPF. You can simulate the functionality in one of these two ways:

0) If you set the ToolTip property to some arbitrary value, you will start to receive the ToolTipOpening event. In your ToolTipOpening event handler, mark the event as handled (e.Handled = true), and the tooltip won't be displayed. At that point, you can do whatever you need to do in your handler.

1) Use the MouseEnter and MouseLeave handlers.

Google is your friend.
 
Share this answer
 
v3
Comments
[no name] 9-Sep-11 17:02pm    
+5 for your cleverness on the tooltip... Although I think (1) is the 'proper' way.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900