I’m new to silverlight and trying to read a silverlight tutorial that uses HitTest method to know when the mouse is over a control.
But unfortunately i cant see any method with this name.
Where is the HitTest method? is that because i’m using silverlight 4? is there any replacement method ?
Older versions (pre 3.0) did have a HitTest method. In Silverlight 3 and 4 you ouwl use the
VisualTreeHelper.FindElementsInHostCoordinatesmethod to acheive a similar goal.For example the following code could be used in a mouse event on surface over which you might be dragging an item. It will determine if any part of the dragged item overlaps the target item. Warning air code