Is there a way to catch a MouseLeftButtonDown (or other mouse event) at a page or user control level and then be able to determine which child control was actually clicked?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes. Set up your handler on the page or other UI root, then use the following method to determine what was clicked within that handler.
Note that there are some requirements for controls to be ‘hit’. One common cause is not having a background defined. Controls may also turn hit testing off with the UIElement.IsHitTestVisible property.