user control on the designer

  • Thread starter Thread starter e-mid
  • Start date Start date
E

e-mid

i created a user control on the designer. the i closed project and when i
opened it again now, i cant see the user control on the design window. i
can only see the code.

how do i make user control appear on the designer again?
 
We often have similar problems and found several workarounds, e.g.
- rename the class
- rename the .cs-file (for C#)
- correct the subtype in the .csproj-file from "Code" two "UserControl"
 
Bernd;

here is the part of csproj file about user control , how shoul i change it?

<File
RelPath = "ucQuestion.cs"

SubType = "Component"

BuildAction = "Compile"

/>

<File

RelPath = "ucQuestion.resx"

DependentUpon = "ucQuestion.cs"

BuildAction = "EmbeddedResource"

/>
 
ok, i figured it.
in fact i was doing it wrong. mine wasn't a user control. i had changed the
code to inherit a panel. when i change the code to inherit usercontrol
again, i get it appear on the designer.

thnkz..
 
That's right. User controls has root designer which means that you can
design it (add controls to it) in the designer. Panels and the other
controls don't have root designers
 
Back
Top