WPF Validation with ContentPresenter
- by Chris
Hi,
I have a WPF user control which needs to validate some fields. It is bound to a class implementing IDataErrorInfo.
When I set the user control as the content of my ContentPresenter in another, already open, window, I can see validation occurring, and error messages being returned, however, I don't get any validation adorner - e.g. the default red outline.
If I enter the field and leave it (triggering re-validation) the validation adorner appears.
Also, if I show the user control in it's own window it shows the validation adorner immediately.
(I'm using Caliburn IResults to do this underneath, e.g. Show.Dialog<VM>(); but I suspect this isn't related)
Can anyone offer any suggestion why the validation adorners aren't appearing immediately. (I had guessed animation on my ContentPresenter ContentChanged, however, I have removed this and still experience the problem.
thanks,
Chris