Search code examples
validationlook-and-feelcatel

Catel: change look and feel of error message


Good day!

How can I change a look and feel of Catel's error message?

Image here

  1. Change a language of string "The following warnings and/or errors found (hover to view);
  2. How can I force validation on every TextChanged event?
  3. I want to change field highlighting look. How can I do that? Make highlighted in red not only field's border, also background of field, for exemple.

Solution

  • 1/3) Create a custom style based on this one.

    2) Every time the property changes on the view model, Catel will re-validate your view model. So it's important to update your binding. You can do that by something like this:

    <TextBox Text="{Binding MyProperty, UpdateSourceTrigger=PropertyChanged}" />