User controls keep disappearing from the toolbox

Posted by rbf on 02-Feb-2009 10:14

Has anyone else experienced user controls that keep disappearing from the toolbox? I am adding a user control to the toolbox and can use it on the form that is currently in view (say, form A). When I switch to form B the toolbox changes and says that there are "No controls in this group". When I switch back to form A the control is back again.

I have tried a couple of things, including restarting OEA and at one point the user control was in the toolbox when form B was active and disappeared when I switched to form A! When I restarted again the user control was gone altogether.

When I open toolbox.xml in the editor I notice that Remove="True". Why does that happen? Setting it back to False does not solve things. This is getting a bit frustrating. I have not been very succesful with user controls at all.

All Replies

Posted by Admin on 02-Feb-2009 18:07

In 'other' IDE's this indicates that the version of the control has changed to that originally added to the toolbox. The IDE views this as being invalid and proceeds to remove the control reference.

Are you rebuilding this control around the time of the disappearance?

The designer host can also suffer from this same level of pain. Your control will serialize its design properties as code in the initialization section. If the rebuilt control does not match this serialization pattern, for example has new/removed/renamed properties which do not handle version support the designer host will fail to load your control - the result is that your previously working programs drop the control off the design surface similar to what you are seeing in the toolbox.

Posted by rbf on 03-Feb-2009 01:32

This is not the case; the control has not changed for a couple of weeks.

Posted by Admin on 04-Feb-2009 12:25

Is the toolbox.xml file write protected?

Posted by rbf on 05-Feb-2009 08:10

Nope.

This thread is closed