Guest User

Untitled

a guest
Jul 16th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. private DoubleAnimation AnimateCursor = new DoubleAnimation();
  2. private Storyboard CursorAnimation = new Storyboard();
  3.  
  4. AnimateCursor.From = 0;
  5. AnimateCursor.To = 1150;
  6. AnimateCursor.Duration = new Duration(TimeSpan.FromSeconds(30));
  7. AnimateCursor.RepeatBehavior = RepeatBehavior.Forever;
  8.  
  9. Storyboard.SetTargetName(AnimateCursor, "timeCurLine");
  10. Storyboard.SetTargetProperty(AnimateCursor, new PropertyPath(Canvas.LeftProperty));
  11.  
  12. CursorAnimation.Children.Add(AnimateCursor);
  13.  
  14. public void StartNavCursor() => CursorAnimation.Begin(timeCurLine);
  15. public void StopNavCursor() => CursorAnimation.Stop(timeCurLine);
Add Comment
Please, Sign In to add comment