Brett Romero wrote:
However, the designer file icon in solution explorer is labeled as c#
in green and not grouped under form1.cs. partial classes I've seen
created in the VS 2005 are always group under the root partial.
Is there something additional I need to do for this to happen?
The grouping of these files is not due to their containing parts
of the same class, but is rather something done by the designer wizard.
So the only way is to create a form? And from there you can't add any
new files to the same group (since the wizard only creates two partial
classes, including the master)?
Well, not from the GUI as far as I know, but if you're willing to go under
the hood there is a way to add files to groups like this. Open up the
project (.csproj) file in a text editor, and find the XML element that looks
like this:
<Compile Include="FileYouWantInGroup.cs" />
Change it to this:
<Compile Include="FileYouWantInGroup.cs">
<DependentUpon>FileWhoseGroupItGoesIn.cs</DependentUpon>
</Compile>
This should do what you want (I'm not sure if it has any other effects).
Normally, however, this is only used for files that are generated from or
otherwise dependent on the "root" file, as the name "DependentUpon" above
suggests. I hope this helps.
--
Derrick Coetzee, MCAD, MSFT (Speech Server)
This posting is provided "AS IS" with no warranties, and confers no
rights.