Inheritance: DependencyObject, IKeySpline
コード例 #1
0
ファイル: SplineDoubleKeyFrame.cs プロジェクト: jokm1/uno-2
 /// <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;
 }
コード例 #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();
 }
コード例 #3
0
 public static CubicBezierEasingFunction CreateCubicBezierEasingFunction(this Compositor compositor, Windows.UI.Xaml.Media.Animation.KeySpline spline)
 {
     return compositor.CreateCubicBezierEasingFunction(spline);
 }
コード例 #4
0
ファイル: SplineEasingFunction.cs プロジェクト: jokm1/uno-2
 public SplineEasingFunction(KeySpline keySpline)
 {
     KeySpline = keySpline;
 }