private void ChildrenOnCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e) { if (e.Action == NotifyCollectionChangedAction.Add) foreach (XMLEntity? item in e.NewItems) item!.ParentElement = this; ChildrenChangedRecursive?.Invoke(this, e); ChildrenChangedDirect?.Invoke(this, e); ParentElement?.NotifyChildChanged(); }
private void NotifyChildChanged() { ChildrenChangedRecursive?.Invoke(this, new EventArgs()); ParentElement?.NotifyChildChanged(); }