Wednesday, June 17, 2009

C# UserControl not displayed in toolbox

Weirdest thing.

If you create a C# (VS2005) UserControl, ineriting UserControl and implement an interface that is defined in the same project in which the user control resides your toolbox will happily show your control. In addition, you can add it to various forms you may have. Everything is as expected.

However, if you attempt to implement an interface defined in a separate project (class library) referenced by the project where the user control resides everything falls apart. Forms that have been showing the user control will not load their designer and the user control tends to disappear from the toolbox.

I have no idea why this is so.


No comments: