Inheritance: DependencyObject, IKeySpline
Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the SplineDoubleKeyFrame class with the specified ending value, key time, and KeySpline.
 /// </summary>
 /// <param name="value">Ending value (also known as "target value") for the key frame.</param>
 /// <param name="keyTime">Key time for the key frame. The key time determines when the target value is reached which is also when the key frame ends.</param>
 /// <param name="keySpline">KeySpline for the key frame. The KeySpline represents a Bezier curve which defines animation progress of the key frame.</param>
 public SplineDoubleKeyFrame(double value, KeyTime keyTime, KeySpline keySpline)
     : base(value, keyTime)
 {
     KeySpline = keySpline;
 }
Ejemplo n.º 2
0
 private void ResetNorth( )
 {
     Storyboard sb = new Storyboard();
     sb.Duration = TimeSpan.FromMilliseconds(500.0);
     DoubleAnimationUsingKeyFrames frames= new DoubleAnimationUsingKeyFrames();
     SplineDoubleKeyFrame frame2 = new SplineDoubleKeyFrame();
     frame2.KeyTime = sb.Duration.TimeSpan;
     frame2.Value = 0.0;
     KeySpline spline = new KeySpline();
     spline.ControlPoint1 = new Point(0.0 , 0.1);
     spline.ControlPoint2 = new Point(0.1 , 1.0);
     frame2.KeySpline = spline;
     SplineDoubleKeyFrame frame = frame2;
     frames.KeyFrames.Add(frame);
     if (this.Map.Angle > 180)
     {
         frame.Value = 360.0;
     }//正转到北
     if (this.Map.Angle <= 180)
     {
         frame.Value = 0.0;
     }//转回去
     frames.SetValue(Storyboard.TargetPropertyProperty , "Angle");
     sb.Children.Add(frames);
     Storyboard.SetTarget(frames , this.Map);
     sb.Begin();
 }
Ejemplo n.º 3
0
 public static CubicBezierEasingFunction CreateCubicBezierEasingFunction(this Compositor compositor, Windows.UI.Xaml.Media.Animation.KeySpline spline)
 {
     return compositor.CreateCubicBezierEasingFunction(spline);
 }
Ejemplo n.º 4
0
 public SplineEasingFunction(KeySpline keySpline)
 {
     KeySpline = keySpline;
 }