How to know what control the mouse has clicked in a canvas?
问题 I am creating a C# WPF application and looking for a way to do the following: I have a canvas with different user controls in it and a button. When I click on the button the cursor change to a hand (Canvas.Cursor = Cursors.Hand) Then if I click on one of the controls I get a message box showing the name of the control clicked (the name is a public property of the control). If I click somewhere else i the cursor resets and I should click on the button again before I can get the name again. I