There is a BO that is bound to WPF form. This BO has two RuleSet. Switching between them takes on a certain algorithm. But switching between sets did not appear on the form. In other words, if the business property is in one RuleSet does not pass validation, is displayed in the control. After changing the RuleSet, property is validated, but control displays the old information, that property is not valid.
What should I do to the form displays current information about data validation?
RuleSets are not supposed to be used on objects that are active in DataBinding.
In order to make this wrk you need to add a similar CheckRules method to your BO and call OnPropertyChanged for all registered properties in order to notify UI of changes to Properties and validation.
/// Checks all rules in the object and notifies UI of properties that may have changed.
protected virtual void CheckRules()
if (ApplicationContext.PropertyChangedMode == ApplicationContext.PropertyChangedModes.Windows)
foreach (var name in this.FieldManager.GetRegisteredProperties())
Thank you, Jonny. It works!
Copyright (c) Marimer LLC