I'm currently facing the issue that my main Form.cs
file grows bigger and bigger and I would like to split it into several partial files. These should stick below the main Form (MainForm.cs
) Node in the Visual Studio Solution Explorer.
I tried creating the new class file and declared it a partial source file of my MainForm
class. However, the newly created partial class file changes it's icon, looking like a form. It instead should stick below the MainForm
Node in the Solution Explorer.
To visualize the problem:
The MainForm.ContextActions.cs
file content is as follows:
namespace Interface_Group_Editor
{
public partial class MainForm
{
[...]
}
}
The content is similar to the MainForm.Designer.cs
file. However the .Designer.cs
file sticks below the MainForm.cs
node while .ContextActions.cs
does not!
I only handle absolutely necessary form events in the MainForm.cs
file and have my business logic in external classes that I access from the form. However, alone my TreeView code to maintain and edit the form takes about 500 lines of code which could be relocated to a new partial source file. This would help the whole visibility of the Project Structure a lot!
Is there any way to force this behavior to the Solution Explorer?