Bug 13147 - ICustomTypeDescriptor ignored on PropertyGrid
Summary: ICustomTypeDescriptor ignored on PropertyGrid
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: Windows.Forms ()
Version: 2.10.x
Hardware: PC All
: Lowest normal
Target Milestone: Community
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-07-10 08:55 UTC by thomaswormald
Modified: 2017-09-01 11:56 UTC (History)
1 user (show)

Tags: mono-community
Is this bug a regression?: ---
Last known good build:


Attachments
Visual Studio project file (opens with Xamarin Studio) (54.56 KB, application/x-zip-compressed)
2013-07-10 08:55 UTC, thomaswormald
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 13147 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description thomaswormald 2013-07-10 08:55:55 UTC
Created attachment 4303 [details]
Visual Studio project file (opens with Xamarin Studio)

ICustomTypeDescriptor allows you to override GetProperties(). By changing the order in which GetProperties() returns the properties, you can change the order in which properties are added to a PropertyGrid. 

The sample that I have attached sorts the properties by the order in which they were declared in the code. There are three properties, declared in the order AAA, CCC, BBB. 

Tested with Visual Studio 2012/.NET 3.5+, the PropertyGrid correctly shows the properties in order AAA, CCC, BBB.
Tested with MonoDevelop 2.8.8.4 Linux/Mono 2.10.8 (Fedora build), the properties are sorted alphabetically, despite PropertySort.NoSort being set.
Tested with Xamarin Studio 4.0.8 (Windows)/Mono 2.10.9, the properties are sorted alphabetically, despite PropertySort.NoSort being set.
Tested with Xamarin Studio 4.0.8 (Windows)/.NET 4.5, the PropertyGrid  correctly shows the properties in order AAA, CCC, BBB.

To run the test: Open with Xamarin studio, and run, check the order of the properties on the PropertyGrid. Should be in the order AAA, CCC, BBB.