How can customize property name column?

Grids for WPF Forum

Posted 7 years ago by Dariusz Wąsacz
Version: 12.2.0573
Avatar

I'd like to customize property name column by i.e. adding an icon to a certain property or changing font. How can I do it? I tried with "HeaderTemplate" and "Header" properties of PropertyGridDataAccessorItem but both don't work.

Comments (2)

Answer - Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Dariusz,

There is a PropertyGrid.NameTemplateSelector property you can set.  It is a DataTemplateSelector.  You can use that to alter the DataTemplate that is rendered for each item.  I'd recommend you inherit our default NameTemplateSelector class and call the base method when not handling your particular use case.


Actipro Software Support

Posted 7 years ago by Dariusz Wąsacz
Avatar

The solution with NameTemplateSelector is fine, however based on this suggestion I found a possiblity to set NameTemplateKey in my classes derived from PropertyEditor class. It is much easier for me to change.

Thank you for the suggestion :-)

The latest build of this product (v2019.1 build 0683) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.