RSS и бегущая строка, красиво
Tag Archives: бегущая строка
WPF Бегущая строка
Вариант раз
Canvas x:Name="Canvas" Background="Transparent" Height="25" VerticalAlignment="Top">
http://axedeos.blogspot.ru/2012/11/wpf.html
Вариант два, с заданием в коде и с паузой
public partial class StopAnimationWindow : System.Windows.Window { AnimationClock clock; public StopAnimationWindow() { InitializeComponent(); } private void StartAnimation(Object sender, RoutedEventArgs e) { DoubleAnimation animation = new DoubleAnimation(); animation.Duration = new Duration(TimeSpan.FromSeconds(5)); animation.To = 500d; animation.From = 0d; clock = animation.CreateClock(); rect.ApplyAnimationClock(Rectangle.WidthProperty, clock); } private void PauseAnimation(Object sender, RoutedEventArgs e) { clock.Controller.Pause(); } private void ResumeAnimation(Object sender, RoutedEventArgs e) { clock.Controller.Resume(); } private void StopAnimation(Object sender, RoutedEventArgs e) { clock.Controller.Stop(); } }
http://social.msdn.microsoft.com/Forums/vstudio/en-US/5eb35986-4666-43f4-9e88-e940bf464ff5/how-to-pause-animation