* 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
1.4 KiB
title, ms.date, helpviewer_keywords, ms.assetid
| title | ms.date | helpviewer_keywords | ms.assetid | ||
|---|---|---|---|---|---|
| How to: Make an Element Spin in Place | 03/30/2017 |
|
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 xref:System.Windows.Media.RotateTransform and a xref:System.Windows.Media.Animation.DoubleAnimation.
The following example applies the xref:System.Windows.Media.RotateTransform to the xref:System.Windows.UIElement.RenderTransform%2A property of the element. The example uses a xref:System.Windows.Media.Animation.DoubleAnimation to animate the xref:System.Windows.Media.RotateTransform.Angle%2A of the xref:System.Windows.Media.RotateTransform. To make the element spin in place, the example sets the xref:System.Windows.UIElement.RenderTransformOrigin%2A property of the element to the point (0.5, 0.5).
Example
[!code-xamltransformanimations_snip#11]
For the complete sample, which includes more transformation examples, see 2D Transforms Sample.