Custom Error Template

Grids for WPF Forum

Posted 4 years ago by John Malone
Version: 14.2.0610
Avatar

How can I set a custom error template on the property grid?

I am populating the grid using the SelectedObject property.

The source object raises errors through the IDataErrorInfo interface.

I want to create a template that will show the text of the error message to the user.

Comments (1)

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

Hi John,

The Validation.ErrorTemplate is set within each property editor DataTemplate itself.  Thus to modify the error template, you'd need to clone the property editor DataTemplates that you use, modify them to use an updated Validation.ErrorTemplate, and put the modified clones in your Application.Resources so they override our defaults.

I believe your company has WPF Studio, so if someone on the account downloads the default styles/templates, look in the PropertyGrid's PropertyEditors.xaml and you'll see the references to "ErrorTemplate" in there.


Actipro Software Support

The latest build of this product (v2019.1 build 0681) was released 12 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.