Dead.Rabit
Dead.Rabit

Reputation: 1975

Binding target value changed event

I have a Decorator Control class which I want to collect all the validation errors from child elements into a collection dependancy property.

I have a tabbed form, need to highlight tabs with errors & number of errors, while displaying errors separately from their owning elements in a ListBox.

currently my class can get relevant BindingExpressions from it's child elements and adds any ValidationErrors to the collection.

My issue is when to run this function, currently it's picking up child bindings when run through the this.Loaded event but I need an event when any child binding is validated.

signing up to the source value changed is what I originally planned, but of course this value is not updated if there is a validation error, Hence the cryptic title.

Any suggestions?

Thanks

Upvotes: 0

Views: 613

Answers (1)

Rick Sladkey
Rick Sladkey

Reputation: 34250

You can use the Validation.Error Attached Event together with the Binding.NotifyOnValidationError Property. You can hook the Validation.Error event using the Validation.AddErrorHandler Method.

Upvotes: 1

Related Questions