How do I set the default PropertyDescriptor?

Is there an attribute to set the default PropertyDescriptor? I just want to add an attribute to a property and specify the PropertyDescriptor. And then an instance of PropertyDescriptor would be created. I didn't find an attribute in the .net framework.

+2


source to share


1 answer


No, you cannot. However, you can implement ICustomTypeDescriptor

or (more simply) inherit from CustomTypeDescriptor

.



If your objects are contained in a collection, you can do an assembly instead ITypedList

.

+1


source







All Articles