protected override void Dispose(bool disposing) { if (disposing && child != null) { child.Dispose(); } base.Dispose(disposing); }
//dispose child if not null protected virtual void deleteChild() { GraphicObject g = child; SetChild(null); if (g != null) { g.Dispose(); } }
protected override void Dispose(bool disposing) { if (_content != null && disposing) { if (_content.Parent == null) { _content.Dispose(); } } base.Dispose(disposing); }
public virtual void ClearChildren() { childrenRWLock.EnterWriteLock(); while (Children.Count > 0) { GraphicObject g = Children [Children.Count - 1]; g.LayoutChanged -= OnChildLayoutChanges; Children.RemoveAt(Children.Count - 1); g.Dispose(); } childrenRWLock.ExitWriteLock(); resetChildrenMaxSize(); this.RegisterForLayouting(LayoutingType.Sizing); ChildrenCleared.Raise(this, new EventArgs()); }
public virtual void DeleteChild(GraphicObject child) { RemoveChild(child); child.Dispose(); }