One Common event for all controls in Silverlight

Posted by Veejay on Stack Overflow See other posts from Stack Overflow or by Veejay
Published on 2010-05-19T07:50:37Z Indexed on 2010/05/19 8:10 UTC
Read the original article Hit count: 231

Filed under:

I have a couple of textblock controls and all of them are calling a single event. But i have to wire all of them invidividually using

TextBlock1.MouseMove += new MouseEventHandler(TextBlock_MouseMove);    TextBlock2.MouseMove += new MouseEventHandler(TextBlock_MouseMove);   
TextBlock3.MouseMove += new MouseEventHandler(TextBlock_MouseMove); 

Is there a way that I can apply the mouse move to all TextBlock without wiring them one by one

© Stack Overflow or respective owner

Related posts about Silverlight