In addition to the essential
HasError properties, the
Validation class also declares an
ErrorTemplate Attached Property of type
ControlTemplate. The default template assigned to this property is responsible for defining the red rectangle that surrounds UI fields that have validation errors associated with them.
However, this property enables us to change this template and so, we are able to define how validation errors are highlighted to the application users. As this property is an Attached Property, this effectively means that we could apply a different template to be displayed for each control in the UI. However, this cannot be recommended, because it could make the application look less consistent. ...