<html dir="ltr" xmlns:mshelp="http://msdn.microsoft.com/mshelp"
xmlns:silverlightsdk="http://msdn.microsoft.com/silverlight" xmlns=
"http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="online documentation, web online help, web help, chm2web" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="chm2web Standard 2.7 (unicode)" />
<meta http-equiv="Content-Type" content=
"text/html; charset=utf-8" />
<title>DoubleAnimation Object</title>
<link rel="stylesheet" href="../../default.css" type="text/css" />
<script type="text/JavaScript" src="../../files/supply.js"></script>
<script type="text/JavaScript">
chmtop.c2wtopf.pageid = "reference/o_doubleanimation.htm";
</script>
</head>
<body topmargin="0"><script type="text/JavaScript">
if (window.name != "content")
document.write(" <table width=\"100%\" bgcolor=\"#e1e1e1\"cellspacing=\"2\" cellpadding=\"0\" style=\"border-collapse: collapse; font-family: sans-serif; font-size: 14px; color: #000000; text-decoration: none; \"> <tr> <td align=\"center\" style=\"border-bottom: 2px solid gray\" > <br> Click <a href=\"../../index.html?page=source%2freference%2fo_doubleanimation.htm\">here</a> to show toolbars of the Web Online Help System: <a href=\"../../index.html?page=source%2freference%2fo_doubleanimation.htm\">show toolbars</a><br> </td></tr></table><br> ");
</script>
<!-- !chm2web! -->
<span id="sdkbannersection"></span>
<div class="tableSection"><span id="sdkbannersection"></span>
<table class="buttonbarshade" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
</div>
<div class="tableSection"><span id="sdkbannersection"></span>
<table class="buttonbartable" cellspacing="0">
<tr id="hdr">
<td class="runninghead" nowrap="nowrap"><img src=
"../common/logo.png" height="21" alt="Silverlight SDK" />
</td>
</tr>
</table>
</div>
<p><span class="betaboilerplate"><font color="gray" pointsize="8.5"
face="Verdana">[This topic is pre-release documentation and is
subject to change in future releases. Blank topics are included as
placeholders.]</font></span>
</p>
<h1><a name=
"silverlight_doubleanimation_object"></a>DoubleAnimation
Object</h1>
<div id="mainSection">
<div id="mainBody">
<p>Animates the value of a <a href="o_double.htm">Double</a>
property between two target values using linear interpolation over
a specified <a href="o_duration.htm">Duration</a>.</p>
<div id="syntaxblock">
<table class="auto_syntaxtable" id="syntaxtable" style=
"width: 90%; background: #CCCCCC; border: none;">
<tr id="xamlSyntaxBlock">
<th class="syntaxblocklanguage" nowrap="nowrap" style=
"width: 150px; background: #EEEEEE; vertical-align: top;">XAML</th>
<td class="syntaxblockcode" style="background:white;">
<div class="codesyntax" style=
"font-family: 'Courier New', Courier, monospace;">
<<b>DoubleAnimation</b> .../></div>
</td>
</tr>
<tr id="scriptingSyntaxBlock">
<th class="syntaxblocklanguage" nowrap="nowrap" style=
"width: 150px; background: #EEEEEE; vertical-align: top;">
Scripting</th>
<td class="syntaxblockcode" style="background:white;">
<div class="codesyntax">To create an object using scripting, see
<a href=
"m_silverlightcontrol_createfromxaml.htm">CreateFromXAML</a>.</div>
</td>
</tr>
</table>
</div>
<h4>Properties</h4>
<p><a href="p_timeline_autoreverse.htm">AutoReverse</a>, <a href=
"p_timeline_begintime.htm">BeginTime</a>, <a href=
"p_doubleanimation_by.htm">By</a>, <a href=
"p_timeline_duration.htm">Duration</a>, <a href=
"p_timeline_fillbehavior.htm">FillBehavior</a>, <a href=
"p_doubleanimation_from.htm">From</a>, <a href=
"p_dependencyobject_name.htm">Name</a>, <a href=
"p_timeline_repeatbehavior.htm">RepeatBehavior</a>, <a href=
"p_timeline_speedratio.htm">SpeedRatio</a>, <a href=
"p_timeline_storyboard_targetname.htm">StoryBoard.TargetName</a>,
<a href=
"p_timeline_storyboard_targetproperty.htm">StoryBoard.TargetProperty</a>,
<a href="p_doubleanimation_to.htm">To</a></p>
<h4>Methods</h4>
<p><a href="m_dependencyobject_getvalue.htm">GetValue</a>, <a href=
"m_dependencyobject_setvalue.htm">SetValue</a></p>
<h4>Events</h4>
<p>None</p>
<span id="remarkssection"></span>
<h4><span id="remarkssection">Remarks</span>
</h4>
<p>An animation updates the value of a property over a period of
time. An animation effect can be subtle, such as moving a <a href=
"o_shape.htm">Shape</a> a few pixels left or right, or dramatic,
such as enlarging an object to 200 times its original size while
spinning it and changing its color. To create an animation, you
associate an animation with an object's property value.</p>
<p>The <b>ColorAnimation</b> class creates a transition between two
target values. To set its target values, use its <a href=
"p_doubleanimation_from.htm">From</a>, <a href=
"p_doubleanimation_to.htm">To</a>, and <a href=
"p_doubleanimation_by.htm">By</a> properties. The following table
summarizes how the <b>From</b>, <b>To</b>, and <b>By</b> properties
may be used together or separately to determine an animation's
target values.</p>
<div class="tableSection">
<div class="tableSection">
<table width="100%" cellspacing="2" cellpadding="5">
<tr>
<th style="width: 150px; background: #EEEEEE;">
<p>Properties specified</p>
</th>
<th style="width: 150px; background: #EEEEEE;">
<p>Resulting behavior</p>
</th>
</tr>
<tr>
<td>
<p><b>From</b>
</p>
</td>
<td>
<p>The animation progresses from the value specified by the
<b>From</b> property to the base value of the property being
animated.</p>
</td>
</tr>
<tr>
<td>
<p><b>From</b> and <b>To</b></p>
</td>
<td>
<p>The animation progresses from the value specified by the
<b>From</b> property to the value specified by the <b>To</b>
property.</p>
</td>
</tr>
<tr>
<td>
<p><b>From</b> and <b>By</b></p>
</td>
<td>
<p>The animation progresses from the value specified by the
<b>From</b> property to the value specified by the sum of the
<b>From</b> and <b>By</b> properties.</p>
</td>
</tr>
<tr>
<td>
<p><b>To</b>
</p>
</td>
<td>
<p>The animation progresses from the animated property's base value
or a previous animation's output value to the value specified by
the <b>To</b> property.</p>
</td>
</tr>
<tr>
<td>
<p><b>By</b>
</p>
</td>
<td>
<p>The animation progresses from the base value of the property
being animated or a previous animation's output value to the sum of
that value and the value specified by the <b>By</b> property.</p>
</td>
</tr>
</table>
</div>
</div>
<p><b>Note</b> If you set both the <b>To</b> and <b>By</b>
properties, the <b>To</b> property takes precedence and the
<b>By</b> property is ignored.</p>
<p>To use other interpolation methods or animate between more than
two target values, use a <a href=
"o_doubleanimationusingkeyframes.htm">DoubleAnimationUsingKeyFrames</a>
object.</p>
<span id="seealsosection"></span>
<h4><span id="seealsosection">See Also</span>
</h4>
<p><a href=
"../conceptual/c_silverlight_animation_overview.htm">Animation
Overview</a>
</p>
</div>
</div>
<script type="text/JavaScript">
var fe = FindFrame("toc", top);
if ((fe != null) && (chmtop.c2wtopf.jstree != null)) {
if (chmtop.c2wtopf.FITEMS[chmtop.c2wtopf.pagenum] != chmtop.c2wtopf.pageid)
chmtop.c2wtopf.jstree.OpenTreeNode("source/" + chmtop.c2wtopf.pageid);
}
</script>
<!-- CHM2WEB -->
<!-- DO NOT DELETE OR MODIFY THIS CODE WITHOUT
WRITTEN PERMISSION OF A!K RESEARCH LABS -->
<table width="100%" cellspacing="0" cellpadding="0"
style="margin-top: 0pt; border-collapse: collapse;">
<tr> <td align="right" style="background-color:white; border-top: 1px solid gray;">
<a href="http://chm2web.aklabs.com" target="_blank" style="font-family: sans-serif; font-size: 11px; text-decoration: none;"><font color="gray">Converted from CHM to HTML with <b>chm2web Standard 2.7 (unicode)</b></font></a>
</td></tr></table>
<!-- /CHM2WEB -->
</body>
</html>