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(Dock pos)
        {
            // todo: verify
            DockBase dock = null;

            switch (pos)
            {
            case Dock.Left:
                if (m_Left == null)
                {
                    m_Left       = new DockBase(this);
                    m_Left.Width = 200;
                    m_Left.SetupChildDock(pos);
                }
                dock = m_Left;
                break;

            case Dock.Right:
                if (m_Right == null)
                {
                    m_Right       = new DockBase(this);
                    m_Right.Width = 200;
                    m_Right.SetupChildDock(pos);
                }
                dock = m_Right;
                break;

            case Dock.Top:
                if (m_Top == null)
                {
                    m_Top        = new DockBase(this);
                    m_Top.Height = 200;
                    m_Top.SetupChildDock(pos);
                }
                dock = m_Top;
                break;

            case Dock.Bottom:
                if (m_Bottom == null)
                {
                    m_Bottom        = new DockBase(this);
                    m_Bottom.Height = 200;
                    m_Bottom.SetupChildDock(pos);
                }
                dock = m_Bottom;
                break;
            }

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

            return(dock);
        }
        /// <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 (m_Left == null)
                {
                    m_Left = new DockBase(this);
                    m_Left.SetupChildDock(pos);
                }
                dock = m_Left;
                break;

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

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

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

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

            return(dock);
        }
Exemplo n.º 3
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 (m_Left == null)
                    {
                        m_Left = new DockBase(this);
                        m_Left.SetupChildDock(pos);
                    }
                    dock = m_Left;
                    break;

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

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

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

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

            return dock;
        }