The Button in WPF MainWindow has normal command attribute. When clicked the handler method receives sender. But the sender is always MainWidow. How to get sender to be a Button ? I need it to be a particular button, because I set this command to several buttons and want to use single handler for many senders. Thank you
views:
18answers:
1
+1
A:
Check the OriginalSource on the event arguments, it should hold the sender who invoked the command!
Hope this helps!
Arcturus
2010-09-01 13:15:34
thank you! Fantastic. Thats exactly what I needed
RocketSurgeon
2010-09-01 13:16:47