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

« back to all changes in this revision

Viewing changes to test/xaml/assorted/remove-while-running-test.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>Timer test</title>
 
3
<meta></meta>
 
4
</head>
 
5
<body>
 
6
 
 
7
<script type="text/javascript">
 
8
function OnMouseEnter (sender, eventArgs)
 
9
{
 
10
  sb = sender.findName("sb");
 
11
  sb.Begin();
 
12
}
 
13
function OnMouseLeave (sender)
 
14
{
 
15
  sb = sender.findName("sb");
 
16
  sender.findName("cvs").Resources.Remove(sb);
 
17
  sender.findName("target") ["Canvas.Left"]="500";
 
18
}
 
19
</script>
 
20
 
 
21
<object type="application/x-silverlight" data="data:," id="slControl" width="800" height="600">
 
22
<param name="background" value="#FFFFFF"/>
 
23
<param name="source" value="#xamlContent"/>
 
24
</object>
 
25
 
 
26
<script type="text/xaml" id="xamlContent">
 
27
<?xml version="1.0"?>
 
28
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 
29
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="cvs">
 
30
 
 
31
        <Rectangle x:Name="activator" Fill="Blue" Canvas.Top="200" Canvas.Left="100" MouseEnter="OnMouseEnter" MouseLeave="OnMouseLeave" Width="200" Height="25" />
 
32
        <Rectangle x:Name="target" Fill="Orange" Canvas.Top="10" Canvas.Left="10" Width="10" Height="10" />
 
33
 
 
34
        <Canvas.Resources>
 
35
                        <Storyboard x:Name="sb">
 
36
                                <DoubleAnimation Storyboard.TargetName="target" Storyboard.TargetProperty="(Canvas.Left)" From="10" To="500" Duration="00:00:10"/>
 
37
                        </Storyboard>
 
38
        </Canvas.Resources>
 
39
        </Canvas>
 
40
</script>
 
41
 
 
42
</body>
 
43
</html>
 
44
 
 
45