views:

291

answers:

1

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?

A: 

Hi,

Set RoutedEvent on your EventTrigger ?

Best Regards,
Vincent BOUZON.

Vincent BOUZON
The default is the Loaded event (i think this is the only event supported in Silverlight) so you don't actually have to define it
James Hay
Ah ok on Silverlight, i have the same issue, their are many bugs issue with Silverlight on Trigger. Do you have try with Behavior ?http://www.c0ding.fr/2009/07/system-windows-interactivity-kesako/
Vincent BOUZON