0

Hi,

I've created 'Windows Control Library' project in VS2005, created one control in this project which inherits from UserControl class like this:

class MyControl : UserControl
{
MyControl(){_myproperty = 0;}
int _myproperty;

int MyProperty
{
       get { return _myproperty;}
       set { _myproperty = value}
}
}

So, now, the property is not available in the 'Properties' window while in the designer.
While I compile and run, the 'Test container' appears, where I can see how MyControl works. In the 'Test container' MyProperty is available in the 'Properties'. This is something I can understand.

The problem is, when I add compiled control library reference to another project and add an instance of MyControl to some form in this new project. There is NO MyProperty in the 'Properties' for MyControl instance.

Ideas?

3
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Ken Sharpe
0

oh... sorry, it is public, I haven't copy-pasted the code - just typed it by hand. It is public and still all above occurs.

Thanks for reply, though

0

Could you post the real code, because otherwise we're just speculating. It really does look like the property isn't public. If the class is public, and the property is public, then you've got a tricky one on your hands. Let's see the code!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.