Standard call to begin StoryBoard

This is a good remind from Yi-Lun Luo(MSFT) from Silverlight Official Forum

Hello, thanks for reporting this issue. I’ve verified the behavior and notified out product team. The issue appears to be: If you use Storyboard.SetTarget to set the target for an animation, if the property path is quite complex, the target will be lost after you begin the Storyboard. If you manually set the target before each Storyboard begins, it will work fine:

Storyboard.SetTarget(s1.Children(0), recMain)
s1.Begin()

Also you can use SetTargetName instead of SetTarget. If your objects are dynamically created, you can write something like this:

recMain.SetValue(FrameworkElement.NameProperty, “rec”)
Storyboard.SetTargetName(d, “rec”)

Yes [Y]Yes [Y]Yes [Y]Yes [Y]Yes [Y]Yes [Y]

One thought on “Standard call to begin StoryBoard

Leave a comment