This can be applied to any language/UI project. When the code is automatically generated, is there a need to name all of the UI controls? Presently I only name the ones I am referencing in code (although admittedly sometimes I get lazy and leave them). Or do you stick with the pre-generated names (textbox1, splitContainer1, menuStrip1, etc..)?
If you name them, how do you prevent overlap such as MyDataGridView1, MyDataGridView2, etc..
I always try to set
GenerateMembertofalsefor the controls I don’t use in the code, but for the controls I do use in code, I usually choose meaningful names.For example, if there was a button that submitted something then I would choose
submitBtn. If there was a username textbox then I would call itusernameTxt. Etc, etc.A small list:
btntxtlblchkradlstdlg…but above all else, just use what makes sense.