Skip to main content

Microsoft Silverlight

Answered Question RC1 now has issue with Storyboard.SetTargetRSS Feed

(0)

kemaltolga
kemaltolga

Member

Member

140 points

113 Posts

RC1 now has issue with Storyboard.SetTarget

I upgraded my Silverlight 2 beta 2 project to Silverlight 2. I fixed all compilation errors, but I am still having a run-time issue with

Storyboard.SetTarget...

with error message: "Operation is not valid on an active Animation or Storyboard.  Root Storyboard must be stopped first."

here is my Silverlight 2 beta 2 code....

void StartStoryboard(String name, int _Spot)

{

    try

    {  

           Storyboard s = this.Resources[name] as Storyboard;            Storyboard.SetTarget(s, Grids[_Spot]);

           s.Begin();

     }

catch { }

}

any ideas what I need to fix.

Thanks

--tolga

Application Developer
tkoseoglu@live.com

metal
metal

Participant

Participant

1243 points

262 Posts

Answered Question

Re: RC1 now has issue with Storyboard.SetTarget

 In all my Dynamic animation code I use  

Storyboard.SetTarget(Anim,obj);

 Where Anim is usually a DoubleAnimation and Obj is the target object.

then the Storyboard object has the Anim added to its Children 

MyStoryboard.Children.Add(Anim);
MyStoryboard.Begin();
but I would have though your way would work just as well. 
 

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities