locked
How to add a new storyboard into object tree?

    General discussion

  • Storyboard sb = new Storyboard();

    .....//Init Sotryboard here 

    .....//the Storyboard.TargetName in animations set to a rectangle whose name is "Test0" here

    Test0.Resources.Add("sb", sb);

     

    When call sb.Begin(), got exception that "Cannot resolve TargetName Test0.";  it seems like sb is not added to object tree, so FindName() doesn't work.

    Is this because Silverlight 2.0 is using static resource?  Is there anyway to walk around it?

     

    Thanks a lot!

    Thursday, October 16, 2008 6:05 AM

All replies