Exemple #1
0
        public void AnimationSet()
        {
            TestUtils.Upload(c_fileName, c_folderName + "/" + c_fileName);
            SlideAnimation dto = new SlideAnimation
            {
                MainSequence = new List <Effect>
                {
                    new Effect {
                        Type = Effect.TypeEnum.Blink, ShapeIndex = 2, ParagraphIndex = 1
                    },
                    new Effect
                    {
                        Type            = Effect.TypeEnum.Box,
                        Subtype         = Effect.SubtypeEnum.In,
                        PresetClassType = Effect.PresetClassTypeEnum.Entrance,
                        ShapeIndex      = 4
                    }
                },
                InteractiveSequences = new List <InteractiveSequence> {
                }
            };
            SlideAnimation animation = TestUtils.SlidesApi.SetAnimation(c_fileName, c_slideIndex, dto, password: c_password, folder: c_folderName);

            Assert.AreEqual(dto.MainSequence.Count, animation.MainSequence.Count);
            Assert.AreEqual(0, animation.InteractiveSequences.Count);
        }
Exemple #2
0
    private void InitPromoteWidgets()
    {
        if (IsInitStatus(TabMode.ShengJi))
        {
            return;
        }
        SetInitStatus(TabMode.ShengJi, true);
        if (null != m_trans_PromoteItemGrowRoot && null == m_promoteGrow)
        {
            Transform ts = UIManager.AddGridTransform(GridID.Uiitemgrowshowgrid, m_trans_PromoteItemGrowRoot);
            if (null != ts)
            {
                m_promoteGrow = ts.GetComponent <UIItemGrowShowGrid>();
                if (null == m_promoteGrow)
                {
                    m_promoteGrow = ts.gameObject.AddComponent <UIItemGrowShowGrid>();
                }
            }
        }
        if (null != m_slider_PromoteExpProgress)
        {
            SlideAnimation slideAnim = m_slider_PromoteExpProgress.GetComponent <SlideAnimation>();
            if (null == slideAnim)
            {
                m_slider_PromoteExpProgress.gameObject.AddComponent <SlideAnimation>();
            }
        }

        CreateMuhonExpGrid();
    }
Exemple #3
0
    void DelayShowFightPowerChangeTips(bool value, int newPower, int prePower)
    {
        m_trans_miscomplete.gameObject.SetActive(false);
        m_trans_fightPowerRoot.gameObject.SetActive(true);

        UILabel label;

        m_trans_Up.gameObject.SetActive(value);
        m_trans_Down.gameObject.SetActive(!value);
        if (value)
        {
            label = m_label_powerUpLabel;
        }
        else
        {
            label = m_label_powerDownLabel;
        }
        SlideAnimation diamondSlide = m_label_powerChangeLabel.GetComponent <SlideAnimation>();

        if (null == diamondSlide)
        {
            diamondSlide = m_label_powerChangeLabel.gameObject.AddComponent <SlideAnimation>();
        }
        int gap = (int)Mathf.Abs(newPower - prePower);

        label.text = gap.ToString();
        float speed = gap / 0.5f;

        if (null != diamondSlide)
        {
            diamondSlide.DoSlideAnim(prePower, newPower, true, speed, null);
        }
    }
Exemple #4
0
        private void RadButton_Click_1(object sender, RoutedEventArgs e)
        {
            this.CreateAlert("SlideAnimation", "This DesktopAlert is shown and hidden using SlideAnimation!");

            var slideInAnimation = new SlideAnimation
            {
                Direction   = AnimationDirection.In,
                SlideMode   = SlideMode.Bottom,
                Orientation = Orientation.Horizontal,
                SpeedRatio  = 0.5d
            };

            var slideOutAnimation = new SlideAnimation
            {
                Direction   = AnimationDirection.Out,
                SlideMode   = SlideMode.Bottom,
                Orientation = Orientation.Horizontal,
                SpeedRatio  = 0.5d
            };

            this.SingleAnimationManager.ShowAnimation = slideInAnimation;
            this.SingleAnimationManager.HideAnimation = slideOutAnimation;

            this.SingleAnimationManager.ShowAlert(this.Alert);
        }
Exemple #5
0
        private void RadButton_Click_1(object sender, RoutedEventArgs e)
        {
            this.CreateAlert("SlideAnimation", "This DesktopAlert is shown and hidden using SlideAnimation!");

            var slideInAnimation = new SlideAnimation
            {
                Direction = AnimationDirection.In,
                SlideMode = SlideMode.Bottom,
                Orientation = Orientation.Horizontal,
                SpeedRatio = 0.5d
            };

            var slideOutAnimation = new SlideAnimation
            {
                Direction = AnimationDirection.Out,
                SlideMode = SlideMode.Bottom,
                Orientation = Orientation.Horizontal,
                SpeedRatio = 0.5d
            };

            this.SingleAnimationManager.ShowAnimation = slideInAnimation;
            this.SingleAnimationManager.HideAnimation = slideOutAnimation;

            this.SingleAnimationManager.ShowAlert(this.Alert);
        }
Exemple #6
0
        public EffectPropertyBuildersTests()
        {
            slide        = new SlideAnimation();
            slideBuilder = new AnimationBuilder(slide);

            property        = new PropertyAnimation();
            propertyBuilder = new AnimationBuilder(property);
        }
Exemple #7
0
        public void AnimationDeleteInteractiveSequenceEffect()
        {
            TestUtils.Upload(c_fileName, c_folderName + "/" + c_fileName);
            SlideAnimation animation = TestUtils.SlidesApi.DeleteAnimationInteractiveSequenceEffect(c_fileName, c_slideIndex, 1, 1, password: c_password, folder: c_folderName);

            Assert.AreEqual(c_effectCount, animation.MainSequence.Count);
            Assert.AreEqual(c_interactiveSequenceCount, animation.InteractiveSequences.Count);
        }
Exemple #8
0
        public void AnimationCreateEffect()
        {
            TestUtils.Upload(c_fileName, c_folderName + "/" + c_fileName);
            Effect dto = new Effect {
                Type = Effect.TypeEnum.Blast, ShapeIndex = 3
            };
            SlideAnimation animation = TestUtils.SlidesApi.CreateAnimationEffect(c_fileName, c_slideIndex, dto, password: c_password, folder: c_folderName);

            Assert.AreEqual(c_effectCount + 1, animation.MainSequence.Count);
            Assert.AreEqual(c_interactiveSequenceCount, animation.InteractiveSequences.Count);
        }
Exemple #9
0
        public void AnimationGet()
        {
            TestUtils.Upload(c_fileName, c_folderName + "/" + c_fileName);
            SlideAnimation animation = TestUtils.SlidesApi.GetAnimation(c_fileName, c_slideIndex, password: c_password, folder: c_folderName);

            Assert.AreEqual(c_effectCount, animation.MainSequence.Count);
            Assert.AreEqual(c_interactiveSequenceCount, animation.InteractiveSequences.Count);
            SlideAnimation animationForShape = TestUtils.SlidesApi.GetAnimation(c_fileName, c_slideIndex, 3, password: c_password, folder: c_folderName);

            Assert.AreEqual(1, animationForShape.MainSequence.Count);
            Assert.AreEqual(0, animationForShape.InteractiveSequences.Count);
            SlideAnimation animationForParagraph = TestUtils.SlidesApi.GetAnimation(c_fileName, c_slideIndex, 3, 1, password: c_password, folder: c_folderName);

            Assert.AreEqual(0, animationForParagraph.MainSequence.Count);
        }
Exemple #10
0
        public void MasterSlideAnimation()
        {
            TestUtils.Upload(c_fileName, c_folderName + "/" + c_fileName);
            SlideAnimation animation = TestUtils.SlidesApi.GetSpecialSlideAnimation(
                c_fileName, c_slideIndex, SpecialSlideType.MasterSlide, null, null, c_password, c_folderName);

            Assert.AreEqual(1, animation.MainSequence.Count);

            SlideAnimation dto = new SlideAnimation
            {
                MainSequence = new List <Effect>
                {
                    new Effect
                    {
                        Type       = Effect.TypeEnum.Blink,
                        ShapeIndex = 2
                    },
                    new Effect
                    {
                        Type       = Effect.TypeEnum.Appear,
                        ShapeIndex = 3
                    }
                }
            };

            animation = TestUtils.SlidesApi.SetSpecialSlideAnimation(
                c_fileName, c_slideIndex, SpecialSlideType.MasterSlide, dto, c_password, c_folderName);
            Assert.AreEqual(dto.MainSequence.Count, animation.MainSequence.Count);
            animation = TestUtils.SlidesApi.GetSpecialSlideAnimation(
                c_fileName, c_slideIndex, SpecialSlideType.MasterSlide, 3, null, c_password, c_folderName);
            Assert.AreEqual(1, animation.MainSequence.Count);

            animation = TestUtils.SlidesApi.DeleteSpecialSlideAnimationEffect(
                c_fileName, c_slideIndex, SpecialSlideType.MasterSlide, 2, c_password, c_folderName);
            Assert.AreEqual(dto.MainSequence.Count - 1, animation.MainSequence.Count);
            animation = TestUtils.SlidesApi.GetSpecialSlideAnimation(
                c_fileName, c_slideIndex, SpecialSlideType.MasterSlide, 3, null, c_password, c_folderName);
            Assert.AreEqual(0, animation.MainSequence.Count);

            animation = TestUtils.SlidesApi.DeleteSpecialSlideAnimation(
                c_fileName, c_slideIndex, SpecialSlideType.MasterSlide, c_password, c_folderName);
            Assert.AreEqual(0, animation.MainSequence.Count);
        }
Exemple #11
0
    void DoAnim(int nNum)
    {
        if (m_labelNum != null)
        {
            m_labelNum.text = "";
            SlideAnimation slider = m_labelNum.transform.GetComponent <SlideAnimation>();
            if (slider == null)
            {
                slider = m_labelNum.gameObject.AddComponent <SlideAnimation>();
            }

            int   gap   = (int)Mathf.Abs(nNum - slider.value);
            float speed = (gap > 3000) ? gap / 3f : 1000;
            if (slider != null)
            {
                slider.DoSlideAnim(slider.value, nNum, false, speed, null);
            }
        }
    }
Exemple #12
0
        private void PanelMenuAnimate()
        {
            var mainLayout = FindViewById(Resource.Id.HomeLayout);

            mainLayout.ClearAnimation();

            var menu = FindViewById(Resource.Id.PanelMenu);

            var animation = new SlideAnimation(mainLayout,
                                               ViewModel.Panel.MenuIsOpen ? 0 : (_menuWidth),
                                               ViewModel.Panel.MenuIsOpen ? (_menuWidth) : 0);

            animation.Duration = GetSlidingAnimationTime();

            animation.AnimationStart += (sender, e) =>
            {
                if (ViewModel.Panel.MenuIsOpen)
                {
                    menu.Visibility = ViewStates.Visible;
                }
            };

            animation.AnimationEnd += (sender, e) =>
            {
                if (!ViewModel.Panel.MenuIsOpen)
                {
                    menu.Visibility       = ViewStates.Gone;
                    _bigButton.Visibility = ViewStates.Gone;
                }
                else
                {
                    _bigButton.Visibility = ViewStates.Visible;
                }
            };

            mainLayout.StartAnimation(animation);
        }
Exemple #13
0
    private void UpdatePromote(Muhon data)
    {
        if (null == data)
        {
            return;
        }
        if (null == data.LocalUpgradeDataBase)
        {
            Engine.Utility.Log.Error(CLASS_NAME + "->upGradeDataBase null");
            return;
        }

        //刷新圣魂升级信息
        if (null != m_promoteGrow)
        {
            m_promoteGrow.SetGridData(data.QWThisID);
        }

        //刷新等级经验信息
        if (null != m_label_Level)
        {
            //当前等级:{0}/{1}   {2}需求等级:{3}
            ColorType cTye = ColorType.Green;
            if (DataManager.Instance.PlayerLv < data.BaseData.useLevel)
            {
                cTye = ColorType.Red;
            }
            string color = ColorManager.GetNGUIColorOfType(ColorType.Gray);
            m_label_Level.text = string.Format("{0}/{1}", data.Level, data.MaxLv);
            //= DataManager.Manager<TextManager>().GetLocalFormatText(LocalTextType.Local_TXT_Soul_Level
            //, data.Level, data.MaxLv, ColorUtil.GetNGUIColorOfType(cTye), data.BaseData.useLevel);
        }
        float expPercentage = (data.IsMaxLv) ? 1f : (float)data.Exp / data.UpgradeExp;

        if (null != m_label_PromoteExpPencentage)
        {
            m_label_PromoteExpPencentage.text = string.Format("{0}%", (expPercentage * 100).ToString("f1"));
        }
        if (null != m_slider_PromoteExpProgress)
        {
            SlideAnimation slideAnim = m_slider_PromoteExpProgress.GetComponent <SlideAnimation>();
            if (null != slideAnim)
            {
                slideAnim.DoSlideAnim(slideAnim.value, expPercentage);
            }
        }
        //刷新基础属性预览
        List <EquipDefine.EquipBasePropertyData> basePropertyList = emgr.GetWeaponSoulBasePropertyData(data.BaseId, data.Level);
        int count = (null != basePropertyList) ? basePropertyList.Count : 0;

        table.WeaponSoulUpgradeDataBase          nextUpgradeDataBase = null;
        List <EquipDefine.EquipBasePropertyData> nexBasePropertyList = null;

        if (!data.IsMaxLv)
        {
            nexBasePropertyList = emgr.GetWeaponSoulBasePropertyData(data.BaseId, data.Level + 1);
        }

        if (null != m_trans_BasePropertyLevel)
        {
            m_trans_BasePropertyLevel.Find("Content/Name").GetComponent <UILabel>().text    = "等级";
            m_trans_BasePropertyLevel.Find("Content/Current").GetComponent <UILabel>().text = data.Level + "";
            m_trans_BasePropertyLevel.Find("Content/Target").GetComponent <UILabel>().text  = (data.IsMaxLv) ? "满级" : "" + (data.Level + 1);
        }
        EquipDefine.EquipBasePropertyData temp = null;
        if (null != m_trans_BaseProperty1)
        {
            if (count >= 1)
            {
                temp = basePropertyList[0];
            }

            m_trans_BaseProperty1.Find("Content/Name").GetComponent <UILabel>().text    = (null != temp) ? temp.Name : "无";
            m_trans_BaseProperty1.Find("Content/Current").GetComponent <UILabel>().text = (null != temp) ? temp.ToString() : "无";
            m_trans_BaseProperty1.Find("Content/Target").GetComponent <UILabel>().text  = (!data.IsMaxLv && null != nexBasePropertyList && nexBasePropertyList.Count >= 1) ? nexBasePropertyList[0].ToString() : "满级";
        }
        if (null != m_trans_BaseProperty2)
        {
            if (count >= 2)
            {
                temp = basePropertyList[1];
            }

            m_trans_BaseProperty2.Find("Content/Name").GetComponent <UILabel>().text    = (null != temp) ? temp.Name : "无";
            m_trans_BaseProperty2.Find("Content/Current").GetComponent <UILabel>().text = (null != temp) ? temp.ToString() : "无";
            m_trans_BaseProperty2.Find("Content/Target").GetComponent <UILabel>().text  = (!data.IsMaxLv && null != nexBasePropertyList && nexBasePropertyList.Count >= 2) ? nexBasePropertyList[1].ToString() : "满级";
        }
        if (null != m_trans_BaseProperty3)
        {
            if (count >= 3)
            {
                temp = basePropertyList[2];
            }

            m_trans_BaseProperty3.Find("Content/Name").GetComponent <UILabel>().text    = (null != temp) ? temp.Name : "无";
            m_trans_BaseProperty3.Find("Content/Current").GetComponent <UILabel>().text = (null != temp) ? temp.ToString() : "无";
            m_trans_BaseProperty3.Find("Content/Target").GetComponent <UILabel>().text  = (!data.IsMaxLv && null != nexBasePropertyList && nexBasePropertyList.Count >= 3) ? nexBasePropertyList[2].ToString() : "满级";
        }
        if (null != m_trans_BaseProperty4)
        {
            if (count >= 4)
            {
                temp = basePropertyList[3];
            }

            m_trans_BaseProperty4.Find("Content/Name").GetComponent <UILabel>().text    = (null != temp) ? temp.Name : "无";
            m_trans_BaseProperty4.Find("Content/Current").GetComponent <UILabel>().text = (null != temp) ? temp.ToString() : "无";
            m_trans_BaseProperty4.Find("Content/Target").GetComponent <UILabel>().text  = (!data.IsMaxLv && null != nexBasePropertyList && nexBasePropertyList.Count >= 4) ? nexBasePropertyList[3].ToString() : "满级";
        }
    }
Exemple #14
0
        /// <internalonly />
        protected override ProceduralAnimation CreateTransitionAnimation(Panel container, AnimationEffectDirection direction)
        {
            bool forward = direction == AnimationEffectDirection.Forward;
            double width = container.ActualWidth;
            double height = container.ActualHeight;

            TranslateTransform topTransform = null;
            TranslateTransform bottomTransform = null;
            Transform existingTransform = null;

            FrameworkElement topContent = (FrameworkElement)container.Children[1];
            FrameworkElement bottomContent = (FrameworkElement)container.Children[0];

            existingTransform = topContent.RenderTransform;
            if (existingTransform != null) {
                topTransform = existingTransform as TranslateTransform;

                if (topTransform == null) {
                    TransformGroup transformGroup = existingTransform as TransformGroup;

                    if (transformGroup != null) {
                        foreach (Transform transform in transformGroup.Children) {
                            topTransform = transform as TranslateTransform;
                            if (topTransform != null) {
                                break;
                            }
                        }
                        if (topTransform == null) {
                            topTransform = new TranslateTransform();
                            transformGroup.Children.Add(topTransform);
                        }
                    }
                }
            }
            existingTransform = bottomContent.RenderTransform;
            if (existingTransform != null) {
                bottomTransform = existingTransform as TranslateTransform;

                if (bottomTransform == null) {
                    TransformGroup transformGroup = existingTransform as TransformGroup;

                    if (transformGroup != null) {
                        foreach (Transform transform in transformGroup.Children) {
                            bottomTransform = transform as TranslateTransform;
                            if (bottomTransform != null) {
                                break;
                            }
                        }
                        if (bottomTransform == null) {
                            bottomTransform = new TranslateTransform();
                            transformGroup.Children.Add(bottomTransform);
                        }
                    }
                }
            }

            if (topTransform == null) {
                topTransform = new TranslateTransform();
                topContent.RenderTransform = topTransform;
            }
            if (bottomTransform == null) {
                bottomTransform = new TranslateTransform();
                bottomContent.RenderTransform = bottomTransform;
            }

            SlideAnimation slideAnimation = new SlideAnimation(container, Duration, forward);
            DoubleAnimation topAnimation = null;
            DoubleAnimation bottomAnimation = null;
            switch (_mode) {
                case SlideMode.Left:
                    if (forward) {
                        bottomTransform.X = width;
                        topAnimation = new DoubleAnimation(topTransform, TranslateTransform.XProperty, Duration, -width);
                        bottomAnimation = new DoubleAnimation(bottomTransform, TranslateTransform.XProperty, Duration, 0);
                    }
                    else {
                        topTransform.X = -width;
                        topAnimation = new DoubleAnimation(topTransform, TranslateTransform.XProperty, Duration, 0);
                        bottomAnimation = new DoubleAnimation(bottomTransform, TranslateTransform.XProperty, Duration, width);
                    }
                    break;
                case SlideMode.Right:
                    if (forward) {
                        bottomTransform.X = -width;
                        topAnimation = new DoubleAnimation(topTransform, TranslateTransform.XProperty, Duration, width);
                        bottomAnimation = new DoubleAnimation(bottomTransform, TranslateTransform.XProperty, Duration, 0);
                    }
                    else {
                        topTransform.X = width;
                        topAnimation = new DoubleAnimation(topTransform, TranslateTransform.XProperty, Duration, 0);
                        bottomAnimation = new DoubleAnimation(bottomTransform, TranslateTransform.XProperty, Duration, -width);
                    }
                    break;
                case SlideMode.Up:
                    if (forward) {
                        bottomTransform.Y = height;
                        topAnimation = new DoubleAnimation(topTransform, TranslateTransform.YProperty, Duration, -height);
                        bottomAnimation = new DoubleAnimation(bottomTransform, TranslateTransform.YProperty, Duration, 0);
                    }
                    else {
                        topTransform.Y = -height;
                        topAnimation = new DoubleAnimation(topTransform, TranslateTransform.YProperty, Duration, 0);
                        bottomAnimation = new DoubleAnimation(bottomTransform, TranslateTransform.YProperty, Duration, height);
                    }
                    break;
                case SlideMode.Down:
                    if (forward) {
                        bottomTransform.Y = -height;
                        topAnimation = new DoubleAnimation(topTransform, TranslateTransform.YProperty, Duration, height);
                        bottomAnimation = new DoubleAnimation(bottomTransform, TranslateTransform.YProperty, Duration, 0);
                    }
                    else {
                        topTransform.Y = height;
                        topAnimation = new DoubleAnimation(topTransform, TranslateTransform.YProperty, Duration, 0);
                        bottomAnimation = new DoubleAnimation(bottomTransform, TranslateTransform.YProperty, Duration, -height);
                    }
                    break;
            }

            TweenInterpolation interpolation = GetEffectiveInterpolation();
            topAnimation.Interpolation = interpolation;
            bottomAnimation.Interpolation = interpolation;

            return new ProceduralAnimationSet(slideAnimation, topAnimation, bottomAnimation);
        }
Exemple #15
0
 public SlideAnimationSerializationTests()
 {
     slide = new SlideAnimation();
 }
 void Start()
 {
     instance    = this;
     destination = GetComponent <Card> ().targetPosition;
 }
Exemple #17
0
        /// <internalonly />
        protected override ProceduralAnimation CreateTransitionAnimation(Panel container, EffectDirection direction)
        {
            bool   forward = direction == EffectDirection.Forward;
            double width   = container.ActualWidth;
            double height  = container.ActualHeight;

            TranslateTransform topTransform      = null;
            TranslateTransform bottomTransform   = null;
            Transform          existingTransform = null;

            FrameworkElement topContent    = (FrameworkElement)container.Children[1];
            FrameworkElement bottomContent = (FrameworkElement)container.Children[0];

            existingTransform = topContent.RenderTransform;
            if (existingTransform != null)
            {
                topTransform = existingTransform as TranslateTransform;

                if (topTransform == null)
                {
                    TransformGroup transformGroup = existingTransform as TransformGroup;

                    if (transformGroup != null)
                    {
                        foreach (Transform transform in transformGroup.Children)
                        {
                            topTransform = transform as TranslateTransform;
                            if (topTransform != null)
                            {
                                break;
                            }
                        }
                        if (topTransform == null)
                        {
                            topTransform = new TranslateTransform();
                            transformGroup.Children.Add(topTransform);
                        }
                    }
                }
            }
            existingTransform = bottomContent.RenderTransform;
            if (existingTransform != null)
            {
                bottomTransform = existingTransform as TranslateTransform;

                if (bottomTransform == null)
                {
                    TransformGroup transformGroup = existingTransform as TransformGroup;

                    if (transformGroup != null)
                    {
                        foreach (Transform transform in transformGroup.Children)
                        {
                            bottomTransform = transform as TranslateTransform;
                            if (bottomTransform != null)
                            {
                                break;
                            }
                        }
                        if (bottomTransform == null)
                        {
                            bottomTransform = new TranslateTransform();
                            transformGroup.Children.Add(bottomTransform);
                        }
                    }
                }
            }

            if (topTransform == null)
            {
                topTransform = new TranslateTransform();
                topContent.RenderTransform = topTransform;
            }
            if (bottomTransform == null)
            {
                bottomTransform = new TranslateTransform();
                bottomContent.RenderTransform = bottomTransform;
            }

            SlideAnimation  slideAnimation  = new SlideAnimation(container, Duration, forward);
            DoubleAnimation topAnimation    = null;
            DoubleAnimation bottomAnimation = null;

            switch (_mode)
            {
            case SlideMode.Left:
                if (forward)
                {
                    bottomTransform.X = width;
                    topAnimation      = new DoubleAnimation(topTransform, TranslateTransform.XProperty, Duration, -width);
                    bottomAnimation   = new DoubleAnimation(bottomTransform, TranslateTransform.XProperty, Duration, 0);
                }
                else
                {
                    topTransform.X  = -width;
                    topAnimation    = new DoubleAnimation(topTransform, TranslateTransform.XProperty, Duration, 0);
                    bottomAnimation = new DoubleAnimation(bottomTransform, TranslateTransform.XProperty, Duration, width);
                }
                break;

            case SlideMode.Right:
                if (forward)
                {
                    bottomTransform.X = -width;
                    topAnimation      = new DoubleAnimation(topTransform, TranslateTransform.XProperty, Duration, width);
                    bottomAnimation   = new DoubleAnimation(bottomTransform, TranslateTransform.XProperty, Duration, 0);
                }
                else
                {
                    topTransform.X  = width;
                    topAnimation    = new DoubleAnimation(topTransform, TranslateTransform.XProperty, Duration, 0);
                    bottomAnimation = new DoubleAnimation(bottomTransform, TranslateTransform.XProperty, Duration, -width);
                }
                break;

            case SlideMode.Up:
                if (forward)
                {
                    bottomTransform.Y = height;
                    topAnimation      = new DoubleAnimation(topTransform, TranslateTransform.YProperty, Duration, -height);
                    bottomAnimation   = new DoubleAnimation(bottomTransform, TranslateTransform.YProperty, Duration, 0);
                }
                else
                {
                    topTransform.Y  = -height;
                    topAnimation    = new DoubleAnimation(topTransform, TranslateTransform.YProperty, Duration, 0);
                    bottomAnimation = new DoubleAnimation(bottomTransform, TranslateTransform.YProperty, Duration, height);
                }
                break;

            case SlideMode.Down:
                if (forward)
                {
                    bottomTransform.Y = -height;
                    topAnimation      = new DoubleAnimation(topTransform, TranslateTransform.YProperty, Duration, height);
                    bottomAnimation   = new DoubleAnimation(bottomTransform, TranslateTransform.YProperty, Duration, 0);
                }
                else
                {
                    topTransform.Y  = height;
                    topAnimation    = new DoubleAnimation(topTransform, TranslateTransform.YProperty, Duration, 0);
                    bottomAnimation = new DoubleAnimation(bottomTransform, TranslateTransform.YProperty, Duration, -height);
                }
                break;
            }

            TweenInterpolation interpolation = GetEffectiveInterpolation();

            topAnimation.Interpolation    = interpolation;
            bottomAnimation.Interpolation = interpolation;

            return(new ProceduralAnimationSet(slideAnimation, topAnimation, bottomAnimation));
        }