<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Rectangle Stroke="Black" StrokeThickness="3"
        Canvas.Left="10" Canvas.Top="10" Width="100" Height="100">

	<Rectangle.Fill>
	    <SolidColorBrush x:Name="rect-brush" Color="Red" />
	</Rectangle.Fill>

	<Rectangle.Triggers>
	    <EventTrigger RoutedEvent="Rectangle.Loaded">
	        <BeginStoryboard>
		    <Storyboard>
		        <ColorAnimation
			    Storyboard.TargetName="rect-brush"
			    Storyboard.TargetProperty="Color"
			    From="Red" To="Blue" Duration="0:0:30"
			/>
		    </Storyboard>
		</BeginStoryboard>
	     </EventTrigger>
	</Rectangle.Triggers>
    </Rectangle>

    <Rectangle x:Name="rect" Fill="Yellow" Stroke="Orange" StrokeThickness="3"
        Canvas.Left="150" Canvas.Top="150" Width="100" Height="100">

	<Rectangle.Triggers>
	    <EventTrigger RoutedEvent="Rectangle.Loaded">
	        <BeginStoryboard>
		    <Storyboard>
		        <ColorAnimation
			    Storyboard.TargetName="rect"
			    Storyboard.TargetProperty="(Fill).(Color)"
			    From="Yellow" To="Green" Duration="0:0:30"
			/>
		    </Storyboard>
		</BeginStoryboard>
	     </EventTrigger>
	</Rectangle.Triggers>
    </Rectangle>

</Canvas>

