/*
         * 1.3 跳转到指定的页面,并伴随页面切换效果
         */
        private void linkToPageWithPageSwitchType(DControl ctl)
        {
            //1.如果显示位置不是 最顶层,则直接显示(无页面切换效果)
            CFrameTag cFrameTag = getCFrameTag(ctl.showInWhichCFrame);
            //2.如果是当前页面
            DPage linkToDPage = dPageBll.get(ctl.linkToPageId);

            if (linkToDPage == null)
            {
                return;
            }
            if (linkToDPage.pageSwitchType <= 0)
            {
                linkToDPage.pageSwitchType = 1;
            }

            //滚动条回到开始
            if (cFrameTag.parentFrame != null)
            {
                object parent = cFrameTag.currCFrame.Parent;
                if (parent is ScrollViewer)
                {
                    ScrollViewer sv = (ScrollViewer)parent;
                    sv.ScrollToVerticalOffset(0);
                    sv.ScrollToHorizontalOffset(0);
                }
            }

            //1.直接进入
            if (linkToDPage.pageSwitchType == 1)
            {
                //  cFrameTag.currCFrame.Background = Brushes.White;
                PageTemplate page1 = new PageTemplate(cFrameTag.currCFrame, ctl.linkToPageId, false, pageTemplate1.screen, pageTemplate1.mqServer);
                cFrameTag.currCFrame.NavigationService.Navigate(page1);
                return;
            }
            //2.淡出淡入
            if (linkToDPage.pageSwitchType == 2)
            {
                PageTemplate pt = (PageTemplate)cFrameTag.currCFrame.Content;
                cFrameTag.currCFrame.Background = Brushes.White;
                pt.RenderTransformOrigin        = new System.Windows.Point(0.5, 0.5);
                TransformGroup group = new TransformGroup();
                pt.RenderTransform = group;

                DoubleAnimation da = new DoubleAnimation(1.0, 0, new Duration(TimeSpan.FromMilliseconds(400)));
                da.BeginTime = TimeSpan.FromMilliseconds(0);
                IEasingFunction easingFunction = new CubicEase()
                {
                    EasingMode = EasingMode.EaseIn
                };
                da.EasingFunction = easingFunction;
                da.Completed     += (sender1, e1) => fadeOut_Completed(ctl, cFrameTag);
                pt.BeginAnimation(UIElement.OpacityProperty, da);

                return;
            }

            //3.右侧移入
            if (linkToDPage.pageSwitchType == 3)
            {
                PageTemplate pt        = (PageTemplate)cFrameTag.currCFrame.Content;
                string       shotImage = ShotUtil.shot(pt);
                cFrameTag.currCFrame.Background = new ImageBrush
                {
                    ImageSource = FileUtil.readImage(AppDomain.CurrentDomain.BaseDirectory + shotImage)
                };
                PageTemplate page = new PageTemplate(cFrameTag.currCFrame, ctl.linkToPageId, true, pageTemplate1.screen, pageTemplate1.mqServer);
                cFrameTag.currCFrame.NavigationService.Navigate(page);
                FrameUtil.RemoveBackEntry(cFrameTag.currCFrame);
                return;
            }

            //4.右侧拉伸
            if (linkToDPage.pageSwitchType == 4)
            {
                PageTemplate pt        = (PageTemplate)cFrameTag.currCFrame.Content;
                string       shotImage = ShotUtil.shot(pt);
                cFrameTag.currCFrame.Background = new ImageBrush
                {
                    ImageSource = FileUtil.readImage(AppDomain.CurrentDomain.BaseDirectory + shotImage)
                };
                PageTemplate page = new PageTemplate(cFrameTag.currCFrame, ctl.linkToPageId, true, pageTemplate1.screen, pageTemplate1.mqServer);
                cFrameTag.currCFrame.NavigationService.Navigate(page);
                FrameUtil.RemoveBackEntry(cFrameTag.currCFrame);
                return;
            }

            //5.中心放大
            if (linkToDPage.pageSwitchType == 5)
            {
                PageTemplate pt        = (PageTemplate)cFrameTag.currCFrame.Content;
                string       shotImage = ShotUtil.shot(pt);
                cFrameTag.currCFrame.Background = new ImageBrush
                {
                    ImageSource = FileUtil.readImage(AppDomain.CurrentDomain.BaseDirectory + shotImage)
                };
                PageTemplate page = new PageTemplate(cFrameTag.currCFrame, ctl.linkToPageId, true, pageTemplate1.screen, pageTemplate1.mqServer);
                cFrameTag.currCFrame.NavigationService.Navigate(page);
                FrameUtil.RemoveBackEntry(cFrameTag.currCFrame);
                return;
            }
        }