2
<title>Stoppping a storyboard and setting manual value test</title>
7
<script type="text/javascript">
8
function OnMouseDownOne (sender, eventArgs)
10
sender.findName ("animation").Begin ();
12
function OnMouseDownTwo (sender, eventArgs)
14
sender.findName ("target").Opacity = 0.0;
15
sender.findName ("animation").Stop ();
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"/>
24
<script type="text/xaml" id="xamlContent">
26
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
27
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
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" />
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>