User Controls in the toolbox in a solution

  • Thread starter Philippe Meunier
  • Start date
P

Philippe Meunier

Ok, I already asked a question similar to this one but didn't found any
answer !

I've a solution with 2 projects in it. One of the project contains
Usercontrols and Inherited Controls. I work actively on both project,
changing the usercontrols and the second project (forms that uses the
usercontrols). When I build my solutuion, my user controls become available
in the Toolbox under "My user controls", with an icon of a user control, but
sometimes (often) event when I build the solution, the controls disappear
from the toolbox, I have to rebuild, open and exit the solution to make the
controls appear in the toolbox. Now you will tell me "Why don't you just do
Add/Remove item.. in the toolbox ?" That's what I tried, but the behaviour
seems different, the icon when I add a control like this is a little gear
(first difference), and I also can have 2 times the same control, one with
the little gear icon and the other with a usercontrol icon.

Someone can explain how this is working ? Maybe how references to
usercontrols works in .NET because we (our team) really don't know how to
work with this. Where can I find information about this ? Maybe it is just
an IDE problem.

Thanx
 
D

Dmitriy Lapshin [C# / .NET MVP]

Hi Philippe,

This seems to be an IDE problem as I have also never been able to figure out
the logic that governs user control visibility on the toolbar. I've
eventually given up on relying on the IDE and always add user controls
myself. They indeed appear as little gears, unless you specify a custom
bitmap with the ToolboxBitmapAttribute applied to a user control.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top