/*
         * 获取显示位置
         *
         * 当前窗口,则返回null
         *
         * 窗口不存在,返回null
         *
         * 其他,返回CFrameTag
         */
        private CFrameTag getCFrameTag(int showInWhichCFrame)
        {
            //  int showInWhichCFrame = ctl.showInWhichCFrame;
            //DControl cFrameDControl = dControlBll.get(ctl.showInWhichCFrame);
            //if (cFrameDControl.linkToPageId == ctl.pageId) {
            //   //当前页面
            //}
            //1.获取当前页面下的CFrame
            foreach (FrameworkElement ele in mainContainer.Children)
            {
                if (ele is CFrame)
                {
                    CFrame   cFrame = (CFrame)ele;
                    DControl dc     = (DControl)cFrame.Tag;
                    if (showInWhichCFrame == dc.id)
                    {
                        Frame     frame      = cFrame.getFrame();
                        CFrameTag cFrameTag1 = (CFrameTag)frame.Tag;
                        return(cFrameTag1);
                    }
                }
            }

            //2.当前即顶层frame
            object    tag       = pageTemplate1.mainFrame.Tag;
            CFrameTag cFrameTag = (CFrameTag)tag;

            if (cFrameTag.parentFrame == null)
            {
                return(cFrameTag);
            }
            //3.判断是否当前frame
            if (showInWhichCFrame == cFrameTag.currDControl.id || showInWhichCFrame == 0)
            {
                //当前页面
                return(cFrameTag);
            }

            //4.判断是否父框架
            CFrameTag isInParent = isInParentCFrame(cFrameTag.parentFrame, showInWhichCFrame);

            return(isInParent);
        }