Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/silverlight/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Silverlight 使用StaticResource时出错_Silverlight_Static Resource - Fatal编程技术网

Silverlight 使用StaticResource时出错

Silverlight 使用StaticResource时出错,silverlight,static-resource,Silverlight,Static Resource,我犯了这个错误 属性{StaticResource StoryboardIntroAnimation}值已过期 射程 当我尝试使用staic资源作为BeginStoryboard对象的Storyboard属性时。标记看起来有点像这样: <UserControl ...> <UserControl.Resources> <Storyboard x:Key="StoryboardIntroAnimation"> ...

我犯了这个错误

属性{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>

...
...

有人知道为什么会发生这种情况吗?

在EventTrigger上设置RoutedEvent?

在EventTrigger上设置RoutedEvent?

默认值是加载的事件(我认为这是Silverlight中唯一支持的事件),因此您实际上不必在Silverlight上定义itAh ok,我有同样的问题,他们的许多错误都是由Silverlight触发的。你有试过行为吗?默认情况下是加载的事件(我认为这是Silverlight中唯一支持的事件),因此您实际上不必在Silverlight上定义itAh ok,我也有同样的问题,他们在触发Silverlight时有许多bug问题。你有试过行为吗?