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.
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.
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.
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 :-)
Please log in to a validated account to post comments.