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 913991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:38:43+00:00 2026-05-15T17:38:43+00:00

How would I reverse a double animation in Silverlight on an event? For example,

  • 0

How would I reverse a double animation in Silverlight on an event? For example, lets say I have an ellipse as a path and I am moving a shape along this path in an infinite loop. If I press a button, I want to reverse the direction of the spin (clockwise <-> counterclockwise).

To be more specific, I am using the PathListBox object that is new in SL4. It has a start property from 0 to 100% (double 0 – 1) that will place the first item at the specified location along the path. By animating this property from 0 to 1 and 1 to 0, I can make an object spin clockwise and counter clockwise.

Lets say I have a button and on the button press, I want to reverse the direction. How do I go about doing it? I’ve tried pausing the animation and swapping the To and From values of the animation and resuming it, but this causes the animation to jump. So if its at “3 o’clock” on the ellipse, it jumps to “9 o’clock” and goes backwards from there. I tried doing something like setting the storyboard’s CurrentTime property to “Duration – CurrentTime”, but that property doesn’t seem to be settable.

So, in conclusion, any ideas about how to reverse an animation on demand?

PS: I know there is a PathListBoxUtils that provides scroll behaviors for PathListBox, but that doesn’t quite implement what I want. Or to put it another way, I am looking to modify the PathListBoxUtils to have an infinitely rotating, reversible carousel rather than scrolling one item at a time.

  • 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. Editorial Team
    Editorial Team
    2026-05-15T17:38:43+00:00Added an answer on May 15, 2026 at 5:38 pm

    Ok, the way I got it working was by pausing the animation, swapping the To and From values, and using the Seek method to move the animation forward by a set amount. The amount I needed it to move forward is “Duration.TimeSpan() – GetCurrentTime()”, but accessing Duration seems to throw an exception (Operation not valid for the current state of the object).

    For now, I just hard coded the Duration value for a test and seems to be working fine. I guess for a real implementation the Duration can be bound to some value and the calculation can use that value too.

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

Sidebar

Related Questions

How would I do in a SELECT query to reverse this path : z/y/x
I have an application that I have behind a reverse proxy, I would like
I have JPG files numbered 3006-3057 that I would like to reverse number. I
Possible Duplicate: Python reverse / inverse a mapping Say I have the following. D
Say I have a field in excel with a domain name and I would
How would I reverse contains in a Linq-to-SQL query so that I can check
I would like to reverse a sentence, but I dont know how I can
I asked the question here and now i would like to reverse this procedure
Would be possible to extend this kind of layout so that I can have
I have got a std::list< std::pair<std::string,double> > , which I know is sorted according

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.