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.
精彩评论