Hi all,
I use CSLA 3.0.2 070928, not use remote data host. I wrote EditableRootParent class, I tried to catch ListChangeEvent when childrenList is changed and call OnPropertyChanged
Ex:
private Project()
{
_resources = ProjectResources.NewProjectResources();
_resources.ListChanged += new System.ComponentModel.ListChangedEventHandler(_resources_ListChanged);
}
void _resources_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
{
OnPropertyChanged(null);
}
At the first time fetch, _nonSerializableHandlers(member of BindableBase class) is not null. But when fetch EditableRootParent again, _nonSerializableHandlers is null and don’t raise event.
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnPropertyChanged(string propertyName)
{
if (_nonSerializableHandlers != null) //Null at the second time fetch
_nonSerializableHandlers.Invoke(this,
new PropertyChangedEventArgs(propertyName));
if (_serializableHandlers != null)
_serializableHandlers.Invoke(this,
new PropertyChangedEventArgs(propertyName));
}
Copyright (c) Marimer LLC