Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void RightToLeftMarquee(TextBlock tb)
- {
- doubleAnimation = new DoubleAnimation();
- doubleAnimation.From = -tb.Width;
- doubleAnimation.To = TickerCanvas.Width;
- doubleAnimation.RepeatBehavior = RepeatBehavior.Forever;
- doubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(100));
- Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath("(Canvas.Right)"));
- sb.Children.Add(doubleAnimation);
- sb.Begin(tb,true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement