Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. private void RightToLeftMarquee(TextBlock tb)
  2. {
  3. doubleAnimation = new DoubleAnimation();
  4. doubleAnimation.From = -tb.Width;
  5. doubleAnimation.To = TickerCanvas.Width;
  6. doubleAnimation.RepeatBehavior = RepeatBehavior.Forever;
  7. doubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(100));
  8. Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath("(Canvas.Right)"));
  9. sb.Children.Add(doubleAnimation);
  10. sb.Begin(tb,true);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement