Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Commented Issue: Feature request: PropertyGrid - explicit category order [17979]

$
0
0
Usually when working with a PropertyGrid you would like your properties to be structured and displayed inside some categories. Now, there are cases when the most appropriate way for displaying categories is not just an alphabetical order but some logical or semantic order instead. Just imagine editing some customer data where you would like to enter the name of the person prior to his or her address.
 
Moreover, most applications today have to provide a way to get localized in a couple of different languages. Localizing category names would once again change the order in which the categories and properties respectively, are displayed. In some cases this might become very confusing and inappropriate.
 
A good solution to this problem might be an explicitly assignable category order attribute (CategoryOrderAttribute class). It would be responsible for retaining the desired category order regardless of the current language and the actual category name.
 
Only a few of changes to the current WPF Toolkit source code are actually required:
 
(1) We need a CategoryOrderAttribute class which in fact is just a renamed PropertyOrderAttribute.
(2) Adding "CategoryOrder" as a new SortDescription within the PropertyGridUtilities.GetCategorizedProperties(..) function.
(3) Finally a new CategoryOrder property has to be added to the PropertyItem class and wired up to read the value from the CategoryOrderAttribute provided by the PropertyDescriptor.
 
A patch to the current WPF Toolkit source code providing the requested functionality is attached to this post.
 
NOTE: There is a similar feature request asking for an explicit order attribute for particular properties (http://wpftoolkit.codeplex.com/workitem/17421).
Comments: ** Comment from web user: JohnDoe9600 **

Somebody submits a small patch to an open source project that adds a broadly useful new feature. Instead of incorporating the patch, the project maintainer adds the feature to their closed source version of the product.

__Am I the only one who sees a problem here?__


Viewing all articles
Browse latest Browse all 4964

Trending Articles