I am trying to hit test in Silverlight applications to find the elements under the mouse cursor.
Normally VisualTreeHelper.FindElementsInHostCoordinates
works for this. If there is a Popup
open I need to pass in the popup to the hit testing method. If there are multiple popups open, I need to determine the correct (topmost) popup to pass in.
Is there any reliable way to determine which Popup
is topmost? I'm doing this in an assembly that may be loaded after the Popup
s have been opened, so I can't rely on tracking the order in which they are opened.
Thanks for any assistance.