Hi All,
I have Silverlight 3 application with two datepickers for Start Date and End Date. They are data bound to a business object which implements validation logic such that the StartDate must be before the EndDate and the EndDate must be after the StartDate.
So far, so good - both controls display the appropriate validation error when a validation exception is thrown in the respective setter.
My problem is if the user changes the 'other' control such that the 'invalid' date in the first control is now valid, the first control's state does not change (because its setter has not been called).
For example, if I set StartDate to 15 Dec 2009 and EndDate to 10 Dec 2009, the EndDate control correctly goes into the invalid state. If the user changes the StartDate to 9 Dec 2009, the EndDate control is still marked as invalid because the UI has not called the EndDate setter.
Is there a 'clean' MVVM-style method of forcing the UI to revalidate?