Geeks With Blogs

Michael Crump Microsoft MVP, INETA Community Champion and XAML Advocate.

I recently needed to create a scrolling text in a WPF application. After I did some digging, I found it and thought that I would post here to share. I’ve added my own touches to it, so the original source has been modified.

<TextBlock Grid.Row="2" FontSize="22" Name="txtScrolling">
  <TranslateTransform x:Name="translate" />
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                <Storyboard RepeatBehavior="Forever">
                        From="1200" To="-1200" 
                        Duration="0:0:9" />
    This is the Text to Scroll

Image the text below is scrolling to get an idea what the XAML does. =)


Posted on Thursday, July 8, 2010 4:34 PM WPF | Back to top

Copyright © mbcrump | Powered by: