How to temporarily disable Visual studio auto generated events?

别来无恙 提交于 2019-12-21 12:07:28

问题


All,

I have finished the GUI design phase... Now I've started to add meaningful names to all the controls in my application. Visual Studio is driving me nuts auto generating the events each time I click on the control to change its name (ok so it only happens when I mess up and double click... but still annoying).

Is there a way to temporarily disable this feature? I still want it because it is a great short cut when I'm coding.

Thanks!


回答1:


You can't disable double clicking AFAIK but you can open document outline (Menu View > Other Windows > Document Outline), and rename the controls via F2 in this window. It'll be much faster and will help see easily the visual tree if your form is complex.




回答2:


afaik there is not. Just be careful with your clicking and if you do mess up CTRL+Z CTRL+Z is your friend :)




回答3:


If you can recognize which controls are which in code, you could open the .Designer.cs files and rename the controls there with the refactoring tool (right click the control name, Refactor, Rename).

It may or may not be straightforward to recognize which controls are which given that you have used generic names so far, but at least it's an option. Personally, I avoid that situation by immediately assigning meaningful names.



来源:https://stackoverflow.com/questions/1511689/how-to-temporarily-disable-visual-studio-auto-generated-events

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!