On your child objects each property should Call PropertyHasChanged. This, I believe sets the dirty flag, and also fires off any rule validation.
public string Description
{
get
{
CanReadProperty(true);
return _description;
}
set
{
CanWriteProperty(true);
if (value == null) value = string.Empty;
if (_description != value)
{
_description = value;
PropertyHasChanged();
}
}
}
I recommend you use the overload of the method that takes the tring name of the Property.
PropertyHasChanged("Description");
This avoids many issues and provides clarity. Also, it is very easy to do when you use a code generator.
If you don't use it then you have to add the no-inlining attribute. Plus there is a small perf hit using the stack trace to figure out the String Property name. Plus there are now some issues with it in WPF, I think. So overall it is easier and better to just provide the property name.
Joe
Copyright (c) Marimer LLC