AutoPlaying a Storyboard
Last post 05-01-2008 10:47 AM by abolbridge. 2 replies.
Sort Posts:
04-30-2008 10:27 PM
AutoPlaying a Storyboard

Hello,

 I'm currently using the Expression Studio 2.5 Trial.

 I built a Silverlight 1 Site in Expression Blend 2.5 but I don't know how to get the storyboard/animation to autoplay or start playing with the OnLoad.

 
Any help on this would be great.

 

 

abolbridge

Loading...
Joined on 04-30-2008
Posts 7
05-01-2008 3:55 AM
Marked as Answer
Re: AutoPlaying a Storyboard

Here is a sample from the sdk.

<Canvas
  xmlns="http://schemas.microsoft.com/client/2007"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <Rectangle
    x:Name="MyAnimatedRectangle"
    Width="100"
    Height="100"
    Fill="Blue">
    <Rectangle.Triggers>

      <!-- Animates the rectangle's opacity. -->
      <EventTrigger RoutedEvent="Rectangle.Loaded">
        <BeginStoryboard>
          <Storyboard>
            <DoubleAnimation
              Storyboard.TargetName="MyAnimatedRectangle"
              Storyboard.TargetProperty="Opacity"
              From="1.0" To="0.0" Duration="0:0:5" AutoReverse="True" RepeatBehavior="Forever" />
          </Storyboard>
        </BeginStoryboard>
      </EventTrigger>
    </Rectangle.Triggers>
  </Rectangle>
</Canvas>

Thierry Bouquain
Ucaya
http://www.ucaya.com

thierry.bouquain

Loading...
Joined on 05-06-2007
Nantes, France
Posts 274
05-01-2008 10:47 AM
Re: Re: AutoPlaying a Storyboard

 Thanks that worked great

abolbridge

Loading...
Joined on 04-30-2008
Posts 7
Page view counter