예제 #1
0
        // Token: 0x06000D00 RID: 3328 RVA: 0x0003062C File Offset: 0x0002E82C
        private static Timeline GenerateToAnimation(FrameworkElement root, Timeline timeline, IEasingFunction easingFunction, bool isEntering)
        {
            Timeline timeline2   = null;
            Color?   targetColor = VisualStateManager.GetTargetColor(timeline, isEntering);

            if (targetColor != null)
            {
                ColorAnimation colorAnimation = new ColorAnimation
                {
                    To             = targetColor,
                    EasingFunction = easingFunction
                };
                timeline2 = colorAnimation;
            }
            if (timeline2 == null)
            {
                double?targetDouble = VisualStateManager.GetTargetDouble(timeline, isEntering);
                if (targetDouble != null)
                {
                    DoubleAnimation doubleAnimation = new DoubleAnimation
                    {
                        To             = targetDouble,
                        EasingFunction = easingFunction
                    };
                    timeline2 = doubleAnimation;
                }
            }
            if (timeline2 == null)
            {
                Point?targetPoint = VisualStateManager.GetTargetPoint(timeline, isEntering);
                if (targetPoint != null)
                {
                    PointAnimation pointAnimation = new PointAnimation
                    {
                        To             = targetPoint,
                        EasingFunction = easingFunction
                    };
                    timeline2 = pointAnimation;
                }
            }
            if (timeline2 != null)
            {
                VisualStateManager.CopyStoryboardTargetProperties(root, timeline, timeline2);
            }
            return(timeline2);
        }