You can use the Loaded event to trigger a storyboard.
See MSDN for an example: Storyboard (Silverlight)
Selected an example from MSDN:
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Rectangle x:Name="MyAnimatedRectangle" Width="100" Height="100" Fill="Blue"> <Rectangle.Triggers> <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>
A Rectangle object has properties. In the Triggers property, we defined an EventTrigger that will fire when this event occurs. We select the Rectangle.Loaded event, which means that it will fire when loading;).
We are adding the BeginStoryboard property to start our storyboard and add a storyboard. This animation will use the DoubleAnimation on the Opacity property, which means that within 5 seconds the opacity gradually disappears to zero and back (AutoReverse property), and it will do this Forever (RepeatBehaviour property).
source share