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

« back to all changes in this revision

Viewing changes to test/xaml/assorted/storyboard-stopping-prop-override.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>Stoppping a storyboard and setting manual value test</title>
 
3
<meta></meta>
 
4
</head>
 
5
<body>
 
6
 
 
7
<script type="text/javascript">
 
8
function OnMouseDownOne (sender, eventArgs)
 
9
{
 
10
        sender.findName ("animation").Begin ();
 
11
}
 
12
function OnMouseDownTwo (sender, eventArgs)
 
13
{
 
14
        sender.findName ("target").Opacity = 0.0;
 
15
        sender.findName ("animation").Stop ();
 
16
}
 
17
</script>
 
18
 
 
19
<object type="application/x-silverlight" data="data:," id="slControl" width="800" height="600">
 
20
<param name="background" value="#FFFFFF"/>
 
21
<param name="source" value="#xamlContent"/>
 
22
</object>
 
23
 
 
24
<script type="text/xaml" id="xamlContent">
 
25
<?xml version="1.0"?>
 
26
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 
27
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
28
 
 
29
        <Rectangle x:Name="target" Fill="Blue" Canvas.Top="100" Canvas.Left="100" Width="25" Height="25" />
 
30
        <Rectangle x:Name="button1" Fill="Gray" Canvas.Top="200" Canvas.Left="100" MouseLeftButtonDown="OnMouseDownOne" Width="50" Height="25" />
 
31
        <Rectangle x:Name="button2" Fill="Gray" Canvas.Top="200" Canvas.Left="200" MouseLeftButtonDown="OnMouseDownTwo" Width="50" Height="25" />
 
32
 
 
33
        <Canvas.Resources>
 
34
                        <Storyboard x:Name="animation">
 
35
                                        <DoubleAnimationUsingKeyFrames
 
36
                                                Storyboard.TargetName="target"
 
37
                                                Storyboard.TargetProperty="(UIElement.Opacity)" BeginTime="0:0:0">
 
38
                                                        <SplineDoubleKeyFrame Value="0.0" KeyTime="0:0:1" KeySpline="0.0,0.3 0.7,1.0" />
 
39
                                        </DoubleAnimationUsingKeyFrames>
 
40
                        </Storyboard>
 
41
        </Canvas.Resources>
 
42
        </Canvas>
 
43
</script>
 
44
 
 
45
</body>
 
46
</html>
 
47
 
 
48