开发者

Avoid MouseOver Event in Silverlight on specific control

开发者 https://www.devze.com 2023-02-03 10:22 出处:网络
I have a number of ellipse controls that are programmatic added on a page. On these controls I have MouseOver events. But I also have a number of lines running over these controls. They aren\'t howeve

I have a number of ellipse controls that are programmatic added on a page. On these controls I have MouseOver events. But I also have a number of lines running over these controls. They aren't however related as in parent/child or anything.

My problem that I need help with is how to avoid that the MouseOver event on the lines fires their event and causes the MouseLeave on the ellipse controls. I don't want anything to happens when one hover over the lines and want the MouseL开发者_运维技巧eave to fire first when one leaves the ellipse (and not when hovering over a line above the ellipse like now).


Try to write the below in the MouseOver event of the lines

e.Handled = true;


Set IsHitTestVisible for your lines to False.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号