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

    <Rectangle Stroke="Black" StrokeThickness="4" Canvas.Left="10" 
        	Canvas.Top="10" Width="100" Height="100" >
    
    	<Rectangle.Fill>
    	    <SolidColorBrush x:Name="rectangle-one-brush" Color="Red" />
    	</Rectangle.Fill>
    	       
    	<Rectangle.Triggers>
    	    <EventTrigger RoutedEvent="Rectangle.Loaded">
    	        <BeginStoryboard>
    		    <Storyboard RepeatBehavior="2x"
    		    Duration="0:0:3">
    		        <ColorAnimationUsingKeyFrames
    			    BeginTime="00:00:00" 
    			    Storyboard.TargetName="rectangle-one-brush"
    			    Storyboard.TargetProperty="Color">
    
    			    <DiscreteColorKeyFrame KeyTime="0:0:2" Value="Purple"/> 
    			    <DiscreteColorKeyFrame KeyTime="0:0:1" Value="Gray"/>
    			</ColorAnimationUsingKeyFrames>
    			
    		    </Storyboard>
    		</BeginStoryboard>
    	    </EventTrigger>
    	</Rectangle.Triggers>
    </Rectangle>

    <Rectangle Stroke="Black" StrokeThickness="4" Canvas.Left="120" Canvas.Top="120" Width="100" Height="100" >

	<Rectangle.Fill>
	    <SolidColorBrush x:Name="rectangle-two-brush" Color="Red" />
	</Rectangle.Fill>
	       
	<Rectangle.Triggers>
	    <EventTrigger RoutedEvent="Rectangle.Loaded">
	        <BeginStoryboard>
		    <Storyboard RepeatBehavior="Forever" 
		    Duration="0:0:4">
		        <ColorAnimationUsingKeyFrames
			    BeginTime="00:00:00" Storyboard.TargetName="rectangle-two-brush"
			    Storyboard.TargetProperty="Color">
			    
			    <ColorAnimationUsingKeyFrames.KeyFrames>		
			        <DiscreteColorKeyFrame KeyTime="00:00:1.4" Value="Blue"/> 
				<DiscreteColorKeyFrame KeyTime="00:00:2.1" Value="Orange"/>
			    </ColorAnimationUsingKeyFrames.KeyFrames>
			</ColorAnimationUsingKeyFrames>
			
		    </Storyboard>
		</BeginStoryboard>
	    </EventTrigger>
	</Rectangle.Triggers>
    </Rectangle>

    
    <Rectangle Stroke="Black" StrokeThickness="4" Canvas.Left="240" Canvas.Top="240" Width="100" Height="100" >
        
        	<Rectangle.Fill>
        	    <SolidColorBrush x:Name="rectangle-three-brush" Color="Red" />
        	</Rectangle.Fill>
        	       
        	<Rectangle.Triggers>
        	    <EventTrigger RoutedEvent="Rectangle.Loaded">
        	        <BeginStoryboard>
        		    <Storyboard RepeatBehavior="3x"
        		    Duration="0:0:4">
        		        <ColorAnimationUsingKeyFrames
        			    BeginTime="00:00:00" Storyboard.TargetName="rectangle-three-brush"
        			    Storyboard.TargetProperty="Color">
        			    
        			    <ColorAnimationUsingKeyFrames.KeyFrames>
        			     	<ColorKeyFrameCollection>	
        			            <DiscreteColorKeyFrame KeyTime="00:00:0.7" Value="Yellow"/> 
        				    <DiscreteColorKeyFrame KeyTime="00:00:3.1" Value="Purple"/>
        			        </ColorKeyFrameCollection>
        			    </ColorAnimationUsingKeyFrames.KeyFrames>
        			</ColorAnimationUsingKeyFrames>
        			
        		    </Storyboard>
        		</BeginStoryboard>
        	    </EventTrigger>
        	</Rectangle.Triggers>
    </Rectangle>

</Canvas>

