Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to change the coding conventions in Visual Studio

I want to change the way that Visual Studio generates the coding template for a WinForms application.

For example in C#:

  1. Once I drag and drop a control on the designer, the name of this control will be in CamelCase
  2. Once I define the control event, Visual Studio generates the code as CamelCase then "_" then the event name in pascalCase

What I want is to tell Visual Studio to use pascalCase in all cases. Is this possible? If so, how?

like image 650
Monah Avatar asked Jan 01 '15 18:01

Monah


1 Answers

You can do it with your own controls using the DesignerSerializer attribute and providing your own CodeDomSerializer, but no, there's no Visual Studio option or a way to hook up the designer to change the serialization for all/built-in controls.

like image 199
Jcl Avatar answered Oct 10 '22 10:10

Jcl