views:

263

answers:

3

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!

A: 

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

Tom Frey
+1  A: 

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.

Eric J.
+2  A: 

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.

Julien Lebosquain
Great Tip!!! Still hate you can't disable that functionality but this is better anyway.
Billy