~ubuntu-branches/ubuntu/karmic/moon/karmic

« back to all changes in this revision

Viewing changes to test/xaml/assorted/mouse-moving-object-tracking.html

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2009-02-14 12:01:08 UTC
  • Revision ID: james.westby@ubuntu.com-20090214120108-06539vb25vhbd8bn
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<head>
 
2
<title>Moving object enter/leave tracking test</title>
 
3
<meta></meta>
 
4
</head>
 
5
<body>
 
6
 
 
7
<script type="text/javascript">
 
8
function OnMouseEnter (sender, eventArgs)
 
9
{
 
10
        sender.findName ("animation1").Begin ();
 
11
}
 
12
function OnMouseLeave (sender, eventArgs)
 
13
{
 
14
        sender.findName ("animation2").Begin ();
 
15
}
 
16
</script>
 
17
 
 
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"/>
 
21
</object>
 
22
 
 
23
<script type="text/xaml" id="xamlContent">
 
24
<?xml version="1.0"?>
 
25
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 
26
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
27
 
 
28
        <Rectangle x:Name="one" Fill="Blue" Canvas.Top="100" Canvas.Left="100" MouseEnter="OnMouseEnter" MouseLeave="OnMouseLeave" Width="25" Height="25" />
 
29
 
 
30
        <Canvas.Resources>
 
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>
 
37
                        </Storyboard>
 
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>
 
44
                        </Storyboard>
 
45
        </Canvas.Resources>
 
46
        </Canvas>
 
47
</script>
 
48
 
 
49
</body>
 
50
</html>
 
51
 
 
52