Question

Are there an attribute for setting default PropertyDescriptor for a property? I just want to add a attribute to a property and specify PropertyDescriptor. And then the instance of the PropertyDescriptor would have been created. I haven't found the attribute in .net framework.

Was it helpful?

Solution

No, you can't. However, you could implement ICustomTypeDescriptor or (easier) inherit from CustomTypeDescriptor.

If your objects are contained in a collection, you could make the collection implement ITypedList instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top