* Reset branch for WPF changes * Convert BMP to PNG; fix link-out-of-scope err * Add snippets for WPF... 6794 files!!!! * Add missing snippets * update file updated between migration * Fix paths to include * update breadcrumb and toc * fix index links * fix index links * fix index links * fix markdown
4.1 KiB
title, ms.date, helpviewer_keywords, ms.assetid
| title | ms.date | helpviewer_keywords | ms.assetid | ||||
|---|---|---|---|---|---|---|---|
| How to: Control an Animation using From, To, and By | 03/30/2017 |
|
59afba57-6fc1-44c8-987e-8a5f4142adad |
How to: Control an Animation using From, To, and By
A "From/To/By" or "basic animation" creates a transition between two target values (see Animation Overview for an introduction to different types of animations). To set the target values of a basic animation, use its xref:System.Windows.Media.Animation.DoubleAnimation.From%2A, xref:System.Windows.Media.Animation.DoubleAnimation.To%2A, and xref:System.Windows.Media.Animation.DoubleAnimation.By%2A properties. The following table summarizes how the xref:System.Windows.Media.Animation.DoubleAnimation.From%2A, xref:System.Windows.Media.Animation.DoubleAnimation.To%2A, and xref:System.Windows.Media.Animation.DoubleAnimation.By%2A properties may be used together or separately to determine an animation's target values.
Note
Do not set both the xref:System.Windows.Media.Animation.DoubleAnimation.To%2A property and the xref:System.Windows.Media.Animation.DoubleAnimation.By%2A property on the same animation.
To use other interpolation methods or animate between more than two target values, use a key frame animation. See Key-Frame Animations Overview for more information.
For information about applying multiple animations to a single property, see Key-Frame Animations Overview.
The example below shows the different effects of setting xref:System.Windows.Media.Animation.DoubleAnimation.To%2A, xref:System.Windows.Media.Animation.DoubleAnimation.By%2A, and xref:System.Windows.Media.Animation.DoubleAnimation.From%2A properties on animations.
Example
[!code-xamlBasicAnimations_snippet#AnimationTargetValuesWholePage]