Open CrossSlide opened 4 years ago
You must handle this in the parent object to call/execute rules on the cild items when the "parent" property has changed. F.ex override CheckPropertyRules
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void CheckPropertyRules(IPropertyInfo property)
{
var propertyNames = BusinessRules.CheckRules(property);
if (ApplicationContext.PropertyChangedMode == ApplicationContext.PropertyChangedModes.Windows)
OnPropertyChanged(property);
else
foreach (var name in propertyNames)
OnPropertyChanged(name);
}
propertyNames will return all changed/affected properties in this validation.
Thank you @jonnybee for the help!
Is there a way to CheckRules on All child BusinessObjects? I have some child rules that look to a parent value. If that parent value changes I need to execute the child rules. An OnParentChanged() event would work. Thanks
CSLA version: 4.6 OS: Windows Platform: WPF