Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

Animating an object along a path RSS

3 replies

Last post May 08, 2008 11:27 AM by budalicious

(0)
  • achobbs

    achobbs

    0 Points

    2 Posts

    Animating an object along a path

    Mar 19, 2008 05:30 AM | LINK

    I am wanting to animate an object along a path. Is it possible to create an animate that can take a Path object that has multiple BezierSegment objects in the PathFigures collection?

     If not, I'm guesing I would just need to use SplineKeyFrames but it would be much easier to just setup a Path that identifies how the X/Y should transform and then run the animation against the Path object.

     Thanks

    animation storyboard Animated animation Animations "Silverlight 2"

  • wlamartin

    wlamartin

    Member

    91 Points

    55 Posts

    Re: Animating an object along a path

    Mar 19, 2008 07:55 PM | LINK

    I recall reading a few days back that animation along a path was not yet available but cannot locate the source. 

    It is something I wanted to do, so I simply drew a path and positioned the object at successive points on the path to make a crude approximation of that.

  • Allen Chen – MSFT

    Allen Chen –...

    Star

    14215 Points

    1854 Posts

    Microsoft

    Re: Animating an object along a path

    Mar 21, 2008 02:53 AM | LINK

    Hi:

      Unfortunately it's not supported yet. To achieve your requirement you might have to use a timer and do the animation yourself.


    Regards

    Sincerely,
    Allen Chen
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • budalicious

    budalicious

    Member

    36 Points

    22 Posts

    Re: Animating an object along a path

    May 08, 2008 11:27 AM | LINK

    I've managed to do this with a bit of a nasty workaround contrary to what MS/everyone else says.

     WPF supports animation along a path so what you can do is create a storyboard in a wpf project then copy the XAML to a new Silverlight project.

    You will need to do some hackery to get rid of WPF specific tags though but it does work