--- title: "How to: Control an Animation using From, To, and By" ms.date: "03/30/2017" helpviewer_keywords: - "animation [WPF], From/to/by" - "basic animation [WPF]" - "animation [WPF], basic animation" - "From/to/by animation" ms.assetid: 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](animation-overview.md) for an introduction to different types of animations). To set the target values of a basic animation, use its , , and properties. The following table summarizes how the , , and properties may be used together or separately to determine an animation's target values. |Properties specified|Resulting behavior| |--------------------------|------------------------| ||The animation progresses from the value specified by the property to the base value of the property being animated or to a previous animation's output value, depending on how the previous animation is configured.| | and |The animation progresses from the value specified by the property to the value specified by the property.| | and |The animation progresses from the value specified by the property to the value specified by the sum of the and properties.| ||The animation progresses from the animated property's base value or a previous animation's output value to the value specified by the property.| ||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 property.| > [!NOTE] > Do not set both the property and the 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](key-frame-animations-overview.md) for more information. For information about applying multiple animations to a single property, see [Key-Frame Animations Overview](key-frame-animations-overview.md). The example below shows the different effects of setting , , and properties on animations. ## Example [!code-xaml[BasicAnimations_snippet#AnimationTargetValuesWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/BasicAnimations_snippet/CS/AnimationTargetValuesExample.xaml#animationtargetvalueswholepage)] ## See also - [Animation Overview](animation-overview.md) - [Key-Frame Animations Overview](key-frame-animations-overview.md) - [From, To, and By Animation Target Values Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Animation/TargetValues)