1

I have a Canvas with different Elements which are created and removed dynamically at runtime inside a canvas, which itself is in a custom Usercontrol.

Now I want to add a few Touchevents, like ManipulationStarted. However, if I bind it on the Canvas, I get the canvas back as sender in my event. I need, however, the specific UIElement that was touched, so I guess I need to bind the event directly to the children. How can I achieve this?

PS: I've already tried creating a custom Event inside the Usercontrol, which is added to the specific child when it's created, however the performance seems to suffer immensely from this approach.

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
Aernomn
  • 21
  • 2
  • Create a style that applies an event setter to each of the children created in a resource. Set the target type of the style to your usercontrol type. – Simon Wood Nov 18 '12 at 17:14

0 Answers0