Note that there are some explanatory texts on larger screens.

plurals
  1. POComplex class declaration confusing forms designer?
    text
    copied!<p>I have a class declared as:</p> <pre><code> public class Foo&lt;T&gt; : Panel where T : Control, IFooNode , new() { ... } </code></pre> <p>I added it by hand to test it, but I will eventually need something that can be displayed in the Forms designer. The Forms designer doesn't like this, it says:</p> <pre> Could not find type 'FooTestNameSpace.Foo'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built. </pre> <p>Interestingly, I ALSO get a warning that is similar, but includes the generic type I used in my declaration of the variable. Warning is:</p> <pre>Could not find type 'FooTestNameSpace.Foo&lt;FooTestNameSpace.FooNodeType&gt;'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built.</pre> <p>The declaration in my simple Form1 class is:</p> <pre>private FooTestNameSpace.Foo myFoo;</pre> <p>(FooNodeType is really just a subclass of Label that has one auxiliary property not yet being used; it does implement IFooNode).</p> <p>So my question... With this type of set up, how can I get Foo to be displayed on the Forms designer, or at least get it to acknowledge that Foo is legit? Is there any Designer attribute that can handle this? I don't really care if my Foo control appears as an empty box, as long as it appears at all!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload