--- title: "How to: Animate an Object Along a Path (Point Animation)" ms.date: "03/30/2017" dev_langs: - "csharp" - "vb" helpviewer_keywords: - "animation [WPF], objects along paths (point animation)" - "point animation [WPF]" ms.assetid: 1fa3f817-35bc-41a1-b366-f5a20b70da0c --- # How to: Animate an Object Along a Path (Point Animation) This example shows how to use a object to animate a along a curved path. ## Example The following example moves an along a path defined by a . The ellipse geometry's property, which takes a value, specifies its position; to move the ellipse geometry, you animate its property. The example uses a to animate the object's property. [!code-xaml[PathAnimationGallery_snippet#PointAnimationUsingPathWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/PathAnimationGallery_snippet/CS/pointanimationusingpathexample.xaml#pointanimationusingpathwholepage)] [!code-csharp[PathAnimationGallery_procedural_snip#PointAnimationUsingPathWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/PathAnimationGallery_procedural_snip/CSharp/PointAnimationUsingPathExample.cs#pointanimationusingpathwholepage)] [!code-vb[PathAnimationGallery_procedural_snip#PointAnimationUsingPathWholePage](~/samples/snippets/visualbasic/VS_Snippets_Wpf/PathAnimationGallery_procedural_snip/VisualBasic/PointAnimationUsingPathExample.vb#pointanimationusingpathwholepage)] For the complete sample, see [Path Animation Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Animation/PathAnimations). The code version of the preceding sample used a to animate the , even though only one animation was applied. A is often the easiest way to apply multiple animations because these animations can be controlled by the same . However, an easier way to apply a single animation to a property when using code is to use the method. For an example, see [Animate a Property Without Using a Storyboard](how-to-animate-a-property-without-using-a-storyboard.md). ## See also - [Path Animation Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Animation/PathAnimations) - [Animation Overview](animation-overview.md) - [Path Animation How-to Topics](path-animation-how-to-topics.md)