1
<Canvas x:Name="parentCanvas"
2
xmlns="http://schemas.microsoft.com/client/2007"
3
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
Width="640" Height="200">
7
<EventTrigger RoutedEvent="Canvas.Loaded">
9
<Storyboard Duration="00:00:03" FillBehavior="Stop">
10
<DoubleAnimation Storyboard.TargetName="rect" Storyboard.TargetProperty="(Canvas.Left)" By="500" Duration="00:00:02" AutoReverse="True" />
16
<Rectangle x:Name="measure1" Canvas.Left="10" Canvas.Top="7" Width="350" Height="3" Fill="Black" />
17
<Rectangle x:Name="measure2" Canvas.Left="10" Canvas.Top="110" Width="350" Height="3" Fill="Black" />
18
<Rectangle x:Name="measure3" Canvas.Left="360" Canvas.Top="7" Width="250" Height="3" Fill="LightGray" />
19
<Rectangle x:Name="measure4" Canvas.Left="360" Canvas.Top="110" Width="250" Height="3" Fill="LightGray" />
20
<Rectangle x:Name="rect" Canvas.Left="10" Canvas.Top="10" Width="100" Height="100" Fill="Red" />
22
<TextBlock x:Name="description" Canvas.Left="20" Canvas.Top="140" Width="600" Height="50">
23
<Run Text="The red block should take 2 seconds to move to the right,"/>
25
<Run Text="start returning left, reach half-way and bounce back left."/>