2
<title>Moving object enter/leave tracking test</title>
7
<script type="text/javascript">
8
function OnMouseEnter (sender, eventArgs)
10
sender.findName ("animation1").Begin ();
12
function OnMouseLeave (sender, eventArgs)
14
sender.findName ("animation2").Begin ();
18
<object type="application/x-silverlight" data="data:," id="slControl" width="300" height="400">
19
<param name="background" value="#FFFFFF"/>
20
<param name="source" value="#xamlContent"/>
23
<script type="text/xaml" id="xamlContent">
25
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
26
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
28
<Rectangle x:Name="one" Fill="Blue" Canvas.Top="100" Canvas.Left="100" MouseEnter="OnMouseEnter" MouseLeave="OnMouseLeave" Width="25" Height="25" />
31
<Storyboard x:Name="animation1">
32
<DoubleAnimationUsingKeyFrames
33
Storyboard.TargetName="one"
34
Storyboard.TargetProperty="(Canvas.Left)" BeginTime="0:0:1">
35
<SplineDoubleKeyFrame Value="200.0" KeyTime="0:0:1" KeySpline="0.0,0.3 0.7,1.0" />
36
</DoubleAnimationUsingKeyFrames>
38
<Storyboard x:Name="animation2">
39
<DoubleAnimationUsingKeyFrames
40
Storyboard.TargetName="one"
41
Storyboard.TargetProperty="(UIElement.Opacity)">
42
<SplineDoubleKeyFrame Value="0.0" KeyTime="0:0:1" KeySpline="0.0,0.3 0.7,1.0" />
43
</DoubleAnimationUsingKeyFrames>