Error when using StaticResource

Posted by James Hay on Stack Overflow See other posts from Stack Overflow or by James Hay
Published on 2009-09-29T12:41:49Z Indexed on 2010/03/31 1:03 UTC
Read the original article Hit count: 493

Hi, I'm getting this error

Attribute {StaticResource StoryboardIntroAnimation} value is out of range

when I try and use a staic resource as the Storyboard property of a BeginStoryboard object. The markup looks a little like this:

<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>

Does anyone know why this is happening?

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about static-resource