I have clickable image/rectangle controls throughout my application and prefer to wire them in code:
clickableimagecontrol.MouseUp += MouseUp_Handler
I am struggling to understand how to do the same with datatemplates. I basically need to find the spot where the template is applied to each item, so I can insert my hooks.
I know WPF recommends using Commands of some type, but that requires more boiler-plate code, not to mention that image/rectangles don't support commands so I'd have to redo the whole thing with styled button controls instead.
Is this possible?