我收到此错误
属性{StaticResource StoryboardIntroAnimation}值已经出来 范围
当我尝试使用staic资源作为BeginStoryboard对象的Storyboard属性时。标记看起来有点像这样:
<UserControl ...>
<UserControl.Resources>
<Storyboard x:Key="StoryboardIntroAnimation">
...
</Storyboard>
</UserControl.Resources>
<UserControl.Triggers>
<EventTrigger>
<EventTrigger.Actions>
<BeginStoryboard Storyboard="{StaticResource StoryboardIntroAnimation}" />
</EventTrigger.Actions>
</EventTrigger>
</UserControl.Triggers>
...
</UserControl>
有谁知道为什么会这样?
答案 0 :(得分:0)
在EventTrigger上设置RoutedEvent?