protected virtual void OnChildAdded(Element child) { child.Parent = this; child.ApplyBindings(skipBindingContext: false, fromBindingContextChanged: true); ChildAdded?.Invoke(this, new ElementEventArgs(child)); OnDescendantAdded(child); foreach (Element element in child.Descendants()) { OnDescendantAdded(element); } }
protected virtual void OnChildAdded(Element child) { child.Parent = this; if (Platform != null) { child.Platform = Platform; } child.ApplyBindings(); if (ChildAdded != null) { ChildAdded(this, new ElementEventArgs(child)); } OnDescendantAdded(child); foreach (Element element in child.Descendants()) { OnDescendantAdded(element); } }
protected virtual void OnChildAdded(Element child) { child.Parent = this; if (Platform != null) child.Platform = Platform; child.ApplyBindings(); if (ChildAdded != null) ChildAdded(this, new ElementEventArgs(child)); OnDescendantAdded(child); foreach (Element element in child.Descendants()) OnDescendantAdded(element); }