Пример #1
0
        protected virtual Drawable Add(Drawable drawable)
        {
            if (drawable == null)
            {
                return(null);
            }

            drawable.changeParent(this);

            internalChildren.Add(drawable);

            Invalidate();
            return(drawable);
        }
Пример #2
0
        public virtual Drawable Add(Drawable drawable)
        {
            if (drawable == null)
            {
                return(null);
            }

            drawable.changeParent(this);
            children.Add(drawable);

            return(drawable);
        }
Пример #3
0
        public void Add(Drawable3D drawable)
        {
            if (LoadState == LoadState.NotLoaded)
            {
                pendingChildren.Add(drawable);
            }
            else
            {
                if (drawable.IsLoaded)
                {
                    Debug.Assert(drawable.Parent == null, "May not add a drawable to multiple containers.");
                    drawable.Parent = this;
                    drawable.Scene  = Scene;
                }

                children.Add(drawable);
            }
        }
Пример #4
0
 protected Drawable AddTopLevel(Drawable drawable)
 {
     drawable.ChangeParent(this);
     children.Add(drawable);
     return(drawable);
 }