Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I create a file that sits next to a .Designer.cs file in Visual Studio?

In Visual Studio, two files are created when you create a new Windows Form in your solution (e.g. if you create MyForm.cs, MyForm.Designer.cs and MyForm.resx are also created). These second two files are displayed as a subtree in the Solution Explorer.

Is there any way to add files to the sub-tree or group for a Windows Form class?

like image 952
pian0 Avatar asked Oct 21 '08 19:10

pian0


1 Answers

Open .csproj in edit mode, look for the file you want to be under another one, and add the DependentUpon element, like this:

<Compile Include="AlertDialog.xaml.cs">
  <DependentUpon>AlertDialog.xaml</DependentUpon>
</Compile>
like image 188
Santiago Palladino Avatar answered Sep 21 '22 15:09

Santiago Palladino