Exemplo n.º 1
0
        /// <summary>
        ///     Gets an inner docked control for the specified position.
        /// </summary>
        /// <param name="pos"></param>
        /// <returns></returns>
        protected virtual DockBase GetChildDock(Pos pos)
        {
            // todo: verify
            DockBase dock = null;

            switch (pos)
            {
            case Pos.Left:
                if (mLeft == null)
                {
                    mLeft = new DockBase(this);
                    mLeft.SetupChildDock(pos);
                }

                dock = mLeft;

                break;

            case Pos.Right:
                if (mRight == null)
                {
                    mRight = new DockBase(this);
                    mRight.SetupChildDock(pos);
                }

                dock = mRight;

                break;

            case Pos.Top:
                if (mTop == null)
                {
                    mTop = new DockBase(this);
                    mTop.SetupChildDock(pos);
                }

                dock = mTop;

                break;

            case Pos.Bottom:
                if (mBottom == null)
                {
                    mBottom = new DockBase(this);
                    mBottom.SetupChildDock(pos);
                }

                dock = mBottom;

                break;
            }

            if (dock != null)
            {
                dock.IsHidden = false;
            }

            return(dock);
        }
Exemplo n.º 2
0
 protected virtual void OnRedundantChildDock(DockBase dock)
 {
     dock.IsHidden = true;
     DoRedundancyCheck();
     DoConsolidateCheck();
 }