开发者

Can I automatically generate methods for Buttons, Checkboxes, etc. in Visual Studio 2010?

开发者 https://www.devze.com 2023-01-05 08:31 出处:网络
One way of doing it is double-clicking on each component and it开发者_开发百科 will automatically create a method for you in Code-Behind file.

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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消