views:

43

answers:

1

One way of doing it is double-clicking on each component and it will automatically create a method for you in Code-Behind file.

But what if you have many components in your project, is there a quicker way to generate those methods rather than by double-clicking on each and every component?

+4  A: 

Hold down Control and select all of the components, go the the Events tab in the Properties window, and double-click the Click event. It will create one event handler and attach it to the Click event of all the components you selected.

Of course, the designer is just generating code, so you could also wire them up by editing the code by hand or with another tool.

Quartermeister
Just for completion, you can do the same in previous versions of VS.
Amby