views:

198

answers:

1

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.

+1  A: 

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.

SLaks