Exemple #1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing && child != null)
     {
         child.Dispose();
     }
     base.Dispose(disposing);
 }
Exemple #2
0
        //dispose child if not null
        protected virtual void deleteChild()
        {
            GraphicObject g = child;

            SetChild(null);
            if (g != null)
            {
                g.Dispose();
            }
        }
Exemple #3
0
 protected override void Dispose(bool disposing)
 {
     if (_content != null && disposing)
     {
         if (_content.Parent == null)
         {
             _content.Dispose();
         }
     }
     base.Dispose(disposing);
 }
Exemple #4
0
        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());
        }
Exemple #5
0
 public virtual void DeleteChild(GraphicObject child)
 {
     RemoveChild(child);
     child.Dispose();
 }