Resolving Target Names from Storyboard in Resource

2019-07-19 04:02发布

I have a Storyboard that animates an Ellipse on a navigation:Page control. As long as I keep the Storyboard local inside the UserControl.Resources the animation runs with no problem.

I moved the Storyboard into a Resource Dictionary to make it available to multiple pages. I can access the Storyboard as expected, but the application throws an exception when the Storyboard attempts to locate the element to animate. I get a 'Cannot resolve TargetName' error.

My guess is that since this is a Silverlight navigation application the Storyboard needs to know about the application hierarchy to get to the page to find the final target - I just don't know how to make that happen :)

标签: silverlight
1条回答
Animai°情兽
2楼-- · 2019-07-19 04:25

Does it use any inherited styles? I havehad this exact problem when using inherited styles. If I move it all to the same resource dictionary or all in the user control, it then works fine.

If not, post a code sample and I can take a look.

查看更多
登录 后发表回答