Beispiel #1
0
        public XamlBoundAnimation(XamlAnimationDescriptor AnimationDesc, Action <string, string> RaisePropertyChangedForGroup)
        {
            this.RaisePropertyChangedForGroup = RaisePropertyChangedForGroup;
            this.AnimationDesc = AnimationDesc;

            // TODO: Accept custom easing
            InternalAnimator = new StateAnimator(
                Pct =>
            {
                // TODO: Add math to do cubic Bezier curve:
                // (0.165, 0.84), (0.44, 1)
                return((float)Math.Pow(Pct, 2));
            },
                Pct =>
            {
                return((float)-Math.Pow(Pct, 2) + 1);
            },
                AnimationDesc.TransitionDuration);
        }
Beispiel #2
0
 public XamlBoundOpacityAnimation(XamlAnimationDescriptor AnimationDesc, Action <string, string> RaisePropertyChangedForGroup)
     : base(AnimationDesc, RaisePropertyChangedForGroup)
 {
 }