private void CreditsWindow_OnLoaded(object sender, RoutedEventArgs e) { DoubleAnimation doubleAnimation = new DoubleAnimation(); doubleAnimation.From = -TextMarquee.ActualHeight; doubleAnimation.To = GridMain.ActualHeight; doubleAnimation.RepeatBehavior = RepeatBehavior.Forever; doubleAnimation.Duration = new Duration(TimeSpan.Parse("0:0:30")); TextMarquee.BeginAnimation(Canvas.BottomProperty, doubleAnimation); }
public CreditsWindow() { InitializeComponent(); TextMarquee.Text = string.Empty; var creditsText = Properties.Resources.Credits; var creditsStream = new StringReader(creditsText); var creditsLine = creditsStream.ReadLine(); while (creditsLine != null) { TextMarquee.Text += creditsLine + '\n'; creditsLine = creditsStream.ReadLine(); } TextMarquee.InvalidateVisual(); }