--- title: "How to: Make an Element Spin in Place" ms.date: "03/30/2017" helpviewer_keywords: - "graphics [WPF], spinning elements" - "spinning elements [WPF]" ms.assetid: 1f011976-8b07-4c31-9faf-019e0ddaa24c --- # How to: Make an Element Spin in Place This example shows how to make an element spin by using a and a . The following example applies the to the property of the element. The example uses a to animate the of the . To make the element spin in place, the example sets the property of the element to the point (0.5, 0.5). ## Example [!code-xaml[transformanimations_snip#11](~/samples/snippets/xaml/VS_Snippets_Wpf/transformanimations_snip/XAML/RotateAboutCenterExample.xaml#11)] For the complete sample, which includes more transformation examples, see [2D Transforms Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Graphics/2DTransforms). ## See also - [Animation Overview](animation-overview.md) - [Transforms Overview](transforms-overview.md)