Skip to main content

Microsoft Silverlight

Answered Question Value out of range for onLoad trigger.RSS Feed

(0)

Shamresh
Shamresh

Member

Member

9 points

21 Posts

Value out of range for onLoad trigger.

Hi,

I am trying to kick off a storyboard that is in the userControl resources section. On the line : <BeginStoryboard Storyboard="{StaticResource spriteKey}" />  I get "value is out of range".

Not sure if the XAML is correct but the problem occurs at runtime.

 Sham.

Ps: XAML is:

 

<UserControl x:Class="SilverlightApplication11.DisneyControl"

xmlns="http://schemas.microsoft.com/client/2007"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

Width="400" Height="300">

<UserControl.Resources>

<Storyboard x:Key="spriteKey" x:Name="SpriteAnimation" RepeatBehavior="Forever">

... 

</Storyboard>

</UserControl.Resources>

<Grid x:Name="LayoutRoot" Background="Gray">

<Canvas HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Height="50">

<Canvas.Triggers>

<EventTrigger RoutedEvent="Canvas.Loaded">

<BeginStoryboard Storyboard="{StaticResource spriteKey}" />

</EventTrigger>

</Canvas.Triggers>

<Canvas x:Name="sprite" Width="200" Height="50">

 ...

</Canvas>

<Canvas.Clip>

<RectangleGeometry Rect="0,0,40,40" />

</Canvas.Clip>

</Canvas>

</Grid>

</UserControl>

-->

Yi-Lun Luo - MSFT
Yi-Lun L...

All-Star

All-Star

25052 points

2,747 Posts

Answered Question

Re: Value out of range for onLoad trigger.

Hello, there're some known issues with EventTrigger that our developers are investigating. Currently we recommend you to begin a Storyboard in code rather than using EventTriggers.

shanaolanxing - I'll transfer to the Windows Azure team, and will have limited time to participate in the Silverlight forum. Apologize if I don't answer your questions in time.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities