public FadeDownNavigationAnimation()
        {
            ForwardAnimationCloseOld = new FadeOutDownAnimation {Distance = 50};
            ForwardAnimationOpenNew = new ScaleInAnimation { Delay = 0.2 };
            ForwardAnimationSequential = false;

            BackAnimationCloseTop = new ScaleOutAnimation();
            BackAnimationReOpenBottom = new FadeInUpAnimation {Distance = 50, Delay = 0.2};
            BackAnimationSequential = false;
        }
        public AnimationDefinition GetAnimation()
        {
            AnimationDefinition animationDefinition = null;

            var randomIndex = new Random().Next(0, 10);

            switch (randomIndex)
            {
            case 0:
                animationDefinition = new FadeInUpAnimation();
                break;

            case 1:
                animationDefinition = new BounceInLeftAnimation();
                break;

            case 2:
                animationDefinition = new BounceInUpAnimation();
                break;

            case 3:
                animationDefinition = new BounceInDownAnimation();
                break;

            case 4:
                animationDefinition = new FadeInDownAnimation();
                break;

            case 5:
                animationDefinition = new FadeInLeftAnimation();
                break;

            case 6:
                animationDefinition = new FadeInRightAnimation();
                break;

            case 7:
                animationDefinition = new BounceInRightAnimation();
                break;

            case 8:
                animationDefinition = new FadeInAnimation();
                break;

            case 9:
                animationDefinition = new BounceInAnimation();
                break;
            }

            return(animationDefinition);
        }
Example #3
0
        public FadeDownNavigationAnimation()
        {
            ForwardAnimationCloseOld = new FadeOutDownAnimation {
                Distance = 50
            };
            ForwardAnimationOpenNew = new ScaleInAnimation {
                Delay = 0.2
            };
            ForwardAnimationSequential = false;

            BackAnimationCloseTop     = new ScaleOutAnimation();
            BackAnimationReOpenBottom = new FadeInUpAnimation {
                Distance = 50, Delay = 0.2
            };
            BackAnimationSequential = false;
        }
        private static AnimationDefinition GetAnimationDefinition(string animationName)
        {
            AnimationDefinition animationDefinition = null;

            if (animationName != null)
            {
                switch (animationName.ToLower())
                {
                case "flash": animationDefinition = new FlashAnimation(); break;

                case "bounce": animationDefinition = new BounceAnimation(); break;

                case "shake": animationDefinition = new ShakeAnimation(); break;

                case "tada": animationDefinition = new TadaAnimation(); break;

                case "swing": animationDefinition = new SwingAnimation(); break;

                case "wobble": animationDefinition = new WobbleAnimation(); break;

                case "pulse": animationDefinition = new PulseAnimation(); break;

                case "breathing": animationDefinition = new BreathingAnimation(); break;

                case "jump": animationDefinition = new JumpAnimation(); break;

                case "flip": animationDefinition = new FlipAnimation(); break;

                case "flipinx": animationDefinition = new FlipInXAnimation(); break;

                case "flipoutx": animationDefinition = new FlipOutXAnimation(); break;

                case "flipiny": animationDefinition = new FlipInYAnimation(); break;

                case "flipouty": animationDefinition = new FlipOutYAnimation(); break;

                case "fadein": animationDefinition = new FadeInAnimation(); break;

                case "fadeout": animationDefinition = new FadeOutAnimation(); break;

                case "fadeinleft": animationDefinition = new FadeInLeftAnimation(); break;

                case "fadeinright": animationDefinition = new FadeInRightAnimation(); break;

                case "fadeinup": animationDefinition = new FadeInUpAnimation(); break;

                case "fadeindown": animationDefinition = new FadeInDownAnimation(); break;

                case "fadeoutleft": animationDefinition = new FadeOutLeftAnimation(); break;

                case "fadeoutright": animationDefinition = new FadeOutRightAnimation(); break;

                case "fadeoutup": animationDefinition = new FadeOutUpAnimation(); break;

                case "fadeoutdown": animationDefinition = new FadeOutDownAnimation(); break;

                case "bouncein": animationDefinition = new BounceInAnimation(); break;

                case "bounceout": animationDefinition = new BounceOutAnimation(); break;

                case "bounceinleft": animationDefinition = new BounceInLeftAnimation(); break;

                case "bounceinright": animationDefinition = new BounceInRightAnimation(); break;

                case "bounceinup": animationDefinition = new BounceInUpAnimation(); break;

                case "bounceindown": animationDefinition = new BounceInDownAnimation(); break;

                case "bounceoutleft": animationDefinition = new BounceOutLeftAnimation(); break;

                case "bounceoutright": animationDefinition = new BounceOutRightAnimation(); break;

                case "bounceoutup": animationDefinition = new BounceOutUpAnimation(); break;

                case "bounceoutdown": animationDefinition = new BounceOutDownAnimation(); break;

                case "scalein": animationDefinition = new ScaleInAnimation(); break;

                case "scaleout": animationDefinition = new ScaleOutAnimation(); break;

                case "lightspeedinleft": animationDefinition = new LightSpeedInLeftAnimation(); break;

                case "lightspeedinright": animationDefinition = new LightSpeedInRightAnimation(); break;

                case "lightspeedoutleft": animationDefinition = new LightSpeedOutLeftAnimation(); break;

                case "lightspeedoutright": animationDefinition = new LightSpeedOutRightAnimation(); break;

                case "hinge": animationDefinition = new HingeAnimation(); break;

                case "reset": animationDefinition = new ResetAnimation(); break;
                }
            }
            return(animationDefinition);
        }