Silverlight XAML Primer 13: Starting and Stopping Animations: Listing 2: Defining a Storyboard inside of a resources section.
<Canvas xmlns="http://schemas.microsoft.com/client/2007">
<Canvas.Resources>
<Storyboard Name="TextBlockAnimation"
Storyboard.TargetName="tbCanvas">
<DoubleAnimationUsingKeyFrames
Storyboard.TargetProperty="(Canvas.Left)" Duration="0:0:3"
AutoReverse="True" RepeatBehavior="Forever">
<LinearDoubleKeyFrame Value="50" KeyTime="0:0:2" />
<LinearDoubleKeyFrame Value="200" KeyTime="0:0:3" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</Canvas.Resources>
<!-- More XAML code follows -->
</Canvas>