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]

Advertisements

One thought on “Standard call to begin StoryBoard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s