1 <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
6 <!-- Test a discrete animation where one of the key frames is NULL -->
8 <Rectangle x:Name="rect" Canvas.Top="10" Canvas.Left="10" Width="20" Height="20" Fill="royalblue">
10 <EventTrigger RoutedEvent="Rectangle.Loaded" >
12 <Storyboard x:Name="sb" BeginTime="0:0:1">
13 <DoubleAnimationUsingKeyFrames x:Name="anim"
14 Storyboard.TargetName="rect"
15 Storyboard.TargetProperty="(Canvas.Left)"
16 FillBehavior="HoldEnd"
18 <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="40"/>
19 <DiscreteDoubleKeyFrame KeyTime="0:0:1"/><!-- cullprit -->
20 <DiscreteDoubleKeyFrame KeyTime="0:0:2" Value="120"/>
21 <LinearDoubleKeyFrame KeyTime="0:0:4" Value="200"/>
22 <DiscreteDoubleKeyFrame KeyTime="0:0:5" value="240"/>
23 </DoubleAnimationUsingKeyFrames>
32 <!-- measures for visual aid -->
33 <Rectangle Canvas.Left="10" Canvas.Top="7" Width="20" Height="3" Fill="LightGray" />
34 <Rectangle Canvas.Left="10" Canvas.Top="30" Width="20" Height="3" Fill="LightGray" />
36 <Rectangle Canvas.Left="40" Canvas.Top="7" Width="20" Height="3" Fill="LightGray" />
37 <Rectangle Canvas.Left="40" Canvas.Top="30" Width="20" Height="3" Fill="LightGray" />
39 <Rectangle Canvas.Left="120" Canvas.Top="7" Width="100" Height="3" Fill="LightGray" />
40 <Rectangle Canvas.Left="120" Canvas.Top="30" Width="100" Height="3" Fill="LightGray" />
42 <Rectangle Canvas.Left="240" Canvas.Top="7" Width="20" Height="3" Fill="LightGray" />
43 <Rectangle Canvas.Left="240" Canvas.Top="30" Width="20" Height="3" Fill="LightGray" />