rgravesdg[CodePlex] I propose a change to the PropertyGrid to allow the use of an associated MetadataType class to define attributes such as DisplayName. This is useful when dealing with auto generated partial classes.
The change is minor, but it does add a dependency on System.ComponentModel.DataAnnotations. The full file is attached, but the change is to use AssociatedMetadataTypeTypeDescriptionProvider to retrieve the PropertyDescriptors.
protected static ListltPropertyDescriptorgt GetPropertyDescriptors( object instance )
{
PropertyDescriptorCollection descriptors;
rgravesdg[CodePlex]
I propose a change to the PropertyGrid to allow the use of an associated MetadataType class to define attributes such as DisplayName. This is useful when dealing with auto generated partial classes.
The change is minor, but it does add a dependency on System.ComponentModel.DataAnnotations. The full file is attached, but the change is to use AssociatedMetadataTypeTypeDescriptionProvider to retrieve the PropertyDescriptors. protected static ListltPropertyDescriptorgt GetPropertyDescriptors( object instance ) { PropertyDescriptorCollection descriptors;