Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 178711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:16:44+00:00 2026-05-11T14:16:44+00:00

In my Silverlight application, I want different texts to repeatedly fly in from the

  • 0

In my Silverlight application, I want different texts to repeatedly fly in from the right changing colors and getting smaller. The animation works the first time through the loop but not subsequent times.

Here’s what I did:

(1) I went into Expression blend, used the ‘Create Storyboard’ tool to create the animation.

then (2) copied the StoryBoard block to my XAML:

<UserControl x:Class='TestWeb124.MainPage'     xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'      xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'      Width='800' Height='600'>     <UserControl.Resources>         <Storyboard x:Key='FadeTextIn'>             <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='OutputText' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)'>                 <SplineDoubleKeyFrame KeyTime='00:00:01.5000000' Value='-111' KeySpline='0,0,0,1'/>             </DoubleAnimationUsingKeyFrames>             <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='OutputText' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)'>                 <SplineDoubleKeyFrame KeyTime='00:00:01.5000000' Value='-88' KeySpline='0,0,0,1'/>             </DoubleAnimationUsingKeyFrames>             <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='OutputText' Storyboard.TargetProperty='(TextBlock.FontSize)'>                 <SplineDoubleKeyFrame KeyTime='00:00:01.5000000' Value='14' KeySpline='0,0,0,1'/>             </DoubleAnimationUsingKeyFrames>             <ColorAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='OutputText' Storyboard.TargetProperty='(TextBlock.Foreground).(SolidColorBrush.Color)'>                 <SplineColorKeyFrame KeyTime='00:00:00' Value='#FFC24343'/>                 <SplineColorKeyFrame KeyTime='00:00:01.5000000' Value='#FF000000' KeySpline='0,0,0,1'/>             </ColorAnimationUsingKeyFrames>         </Storyboard>     </UserControl.Resources>      <Grid x:Name='LayoutRoot' Background='White'>         <StackPanel Margin='20'>             <TextBlock Height='57' Margin='190,90,133,0' VerticalAlignment='Top' Text='This is a test.' TextWrapping='Wrap' FontSize='36' RenderTransformOrigin='0.5,0.5' x:Name='OutputText' Foreground='#FF000000'>             <TextBlock.RenderTransform>                 <TransformGroup>                     <ScaleTransform/>                     <SkewTransform/>                     <RotateTransform/>                     <TranslateTransform/>                 </TransformGroup>             </TextBlock.RenderTransform>             </TextBlock>         </StackPanel>     </Grid> </UserControl> 

Then (3) in my code behind I run through a timer loop. The animation works great the first time, but subsequent times there is no animation:

public void Each_Tick(object o, EventArgs sender) {     if (_secondsElapsed % 5 == 0 || _secondsElapsed == 0)     {         OutputText.Text = String.Format('{0}', _customerFirstNames.ElementAt(_customerNodeIndex));         Storyboard fadeTextIn = (Storyboard)Resources['FadeTextIn'];         fadeTextIn.Begin();         _customerNodeIndex++;         if (_customerNodeIndex > _customerFirstNames.Count() - 1) _customerNodeIndex = 0;     }     _secondsElapsed++; } 

It seems that I need to reset the position of the new piece next piece of text that is supposed to fly it. How do I do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T14:16:45+00:00Added an answer on May 11, 2026 at 2:16 pm
            <Storyboard x:Name='FadeTextIn'>             <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='OutputText' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)'>                 <SplineDoubleKeyFrame KeyTime='00:00:00' Value='0' KeySpline='0,0,0,1'/>                 <SplineDoubleKeyFrame KeyTime='00:00:01.5000000' Value='-111' KeySpline='0,0,0,1'/>             </DoubleAnimationUsingKeyFrames>             <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='OutputText' Storyboard.TargetProperty='(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)'>                 <SplineDoubleKeyFrame KeyTime='00:00:00' Value='0' KeySpline='0,0,0,0'/>                 <SplineDoubleKeyFrame KeyTime='00:00:01.5000000' Value='-88' KeySpline='0,0,0,1'/>             </DoubleAnimationUsingKeyFrames>             <DoubleAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='OutputText' Storyboard.TargetProperty='(TextBlock.FontSize)'>                 <SplineDoubleKeyFrame KeyTime='00:00:00' Value='36' KeySpline='0,0,0,0'/>                 <SplineDoubleKeyFrame KeyTime='00:00:01.5000000' Value='14' KeySpline='0,0,0,1'/>             </DoubleAnimationUsingKeyFrames>             <ColorAnimationUsingKeyFrames BeginTime='00:00:00' Storyboard.TargetName='OutputText' Storyboard.TargetProperty='(TextBlock.Foreground).(SolidColorBrush.Color)'>                 <SplineColorKeyFrame KeyTime='00:00:00' Value='#FFC24343'/>                 <SplineColorKeyFrame KeyTime='00:00:01.5000000' Value='#FF000000' KeySpline='0,0,0,1'/>             </ColorAnimationUsingKeyFrames>         </Storyboard> 

    What the Storyboard is doing is to take an Element and then animate the manipulation of it’s properties. That’s why the second time it runs the Element already has the target properties, so by adding a keyframe for the start of the animation that sets the values to the initial values your animation will repeat nicely.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

in my silverlight application i want to create a style from code behind and
I want to call aspx page from my silverlight application. I kept that aspx
I'm developing a Silverlight application where I want to simulate a console. There are
I want to make a Silverlight application in Expression Blend because of the rich
I'm developing a Silverlight 3 Application which I want to connect to a webservice
I am making an application in silverlight 3.0 In that application i want to
I am developing a Silverlight application with custom animations. I want to update the
I have a silverlight application that contains Bing map. I want when the user
I am working on a Silverlight application, and I want to bind the simple
I have a Silverlight 3 application, and in a method, I want to determine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.