Hi Ray,
If the base class of a class has a designer, VS will open the class in the CSharp Form Editor by default. Right click on the .cs file in Solution Explorer and choose "Open With" command. In the Open With dialog, select CSharp Editor and click the Set as Default button and click the OK button.
Note that this setting takes effects to the Visual Studio IDE, i.e. thissetting applies to anysolution opened in the Visual Studio IDE. Unfortunately, there's no way to set the setting for an individual file.
In your practice, if the designer is written by yourself, you can remove the DesignerAttribute from the base class of your custom control so that the class in question will be opened in the source editor by default.
Sincerely, Linda Liu |