In real world scenarios you often do not want to display the settings or values of an object in a strict alphabetical order. Most of the time it is more appropriate to order your properties into categories and then display these categories in a logical order.
Now, you could either prepend a number to your category name like this:
1. General settings
2. Input settings
3. Brush properties
4. Color settings
or you could try hard to find category names so that their alphabetical order corresponds to their logical order:
* All general settings (?)
* All input settings (?)
* Brush properties
* Color settings
In most cases this won't be possible, though, and becoming especially nasty if you are going to localize your application to different languages.
Both solutions just won't do.
The _real_ solution consists of simply adding a new __CategoryOrderAttribute__ attribute and use it for all the properties needed to be sorted. I am using this attribute since WPF Toolkit v1.6.0, adding it to my code with every new release.
Only a few changes are actually required to add this feature to the current code (mostly one-liners & copy and paste). I attached a patch file to enable category ordering for the current version of WPF Toolkit 1.9.0.
Comments: ** Comment from web user: emartin **
Now, you could either prepend a number to your category name like this:
1. General settings
2. Input settings
3. Brush properties
4. Color settings
or you could try hard to find category names so that their alphabetical order corresponds to their logical order:
* All general settings (?)
* All input settings (?)
* Brush properties
* Color settings
In most cases this won't be possible, though, and becoming especially nasty if you are going to localize your application to different languages.
Both solutions just won't do.
The _real_ solution consists of simply adding a new __CategoryOrderAttribute__ attribute and use it for all the properties needed to be sorted. I am using this attribute since WPF Toolkit v1.6.0, adding it to my code with every new release.
Only a few changes are actually required to add this feature to the current code (mostly one-liners & copy and paste). I attached a patch file to enable category ordering for the current version of WPF Toolkit 1.9.0.
Comments: ** Comment from web user: emartin **
This feature will be made open source in the next version (2.1)