public class MyClass
{
// Some staff
}
public class MyControl : UserControl
{
public MyClass MyObj { get; set; }
}
I want MyObj property to be able to set through the property window of MS Visual Studio. However it is grayed like a readonly property.
I suppose that I should add some designer attributes, but have no idea where and which.
Edit
The simplest solution is to inherit MyClass from Component. No attributes are required.
public class MyClass : Component
Try if this works
EDITED after user comment:
This test code works as expected to me:
EDITED AGAIN:
If you want property editor to behave like you describe, the simplest solution I can give you is this
or