public virtual void RemoveChild(ParentedElement child, bool destroy) { if (destroy) { child.Destroy(); } child.Resized -= new ElementEventHandler(childResized); child.Moved -= new ElementEventHandler(childMoved); if (ActiveChild == child) { ActiveChild = null; } Children.Remove(child); }
public virtual void AddChild(ParentedElement child, bool makeActive) { Children.Add(child); child.setParent(this); this.ActiveChild = child; child.Resized += new ElementEventHandler(childResized); child.Moved += new ElementEventHandler(childMoved); if (makeActive) { this.ActiveChild = child; } }
/// <summary> /// Destroys child as well /// </summary> public void RemoveChild(ParentedElement child) { RemoveChild(child, true); }
public void AddChild(ParentedElement child) { AddChild(child, true); }