public override PropertyDescriptorCollection GetProperties( ITypeDescriptorContext context, object value, Attribute[] attributes) { var pdc = new ArrayList(_wrappedConverter.GetProperties(context, value, attributes)); pdc.Sort(new PropertyGridSortComparer()); var pds = new PropertyDescriptor[pdc.Count]; var i = 0; foreach (PropertyDescriptor pd in pdc) { pds[i] = new PropertyDescriptorWrapper(pd); i++; } return new PropertyDescriptorCollection(pds); }
public override PropertyDescriptorCollection GetProperties( ITypeDescriptorContext context, object value, Attribute[] attributes) { var pdc = new ArrayList(_wrappedConverter.GetProperties(context, value, attributes)); pdc.Sort(new PropertyGridSortComparer()); var pds = new PropertyDescriptor[pdc.Count]; var i = 0; foreach (PropertyDescriptor pd in pdc) { pds[i] = new PropertyDescriptorWrapper(pd); i++; } return(new PropertyDescriptorCollection(pds)); }