开发者

Avoid MouseOver Event in Silverlight on specific control

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜