Files
docs-desktop/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-rotate-an-object-by-using-a-geometric-path.md
T
Andy De George da363692ff Initial WPF content migrated (#17)
* 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
2020-09-04 09:46:28 -07:00

2.7 KiB

title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
title ms.date dev_langs helpviewer_keywords ms.assetid
How to: Rotate an Object by Using a Geometric Path 03/30/2017
csharp
vb
geometric paths [WPF], rotating objects by
rotating objects by geometric paths [WPF]
cb31ca4d-f05a-4c6b-9a18-4b6faaf38d45

How to: Rotate an Object by Using a Geometric Path

This example shows how to rotate (pivot) an object along a geometric path that is defined by a xref:System.Windows.Media.PathGeometry object.

Example

The following example uses three xref:System.Windows.Media.Animation.DoubleAnimationUsingPath objects to move a rectangle along a geometric path.

[!code-xamlPathAnimationGallery_snippet#RotateAnimationUsingPathWholePage]

[!code-csharpPathAnimationGallery_procedural_snip#RotateAnimationUsingPathWholePage] [!code-vbPathAnimationGallery_procedural_snip#RotateAnimationUsingPathWholePage]

Another way to rotate an object by using a geometric path is to use a xref:System.Windows.Media.Animation.MatrixAnimationUsingPath object and set its xref:System.Windows.Media.Animation.MatrixAnimationUsingPath.DoesRotateWithTangent%2A property to true. For more information and an example, see Rotate an Object by Using a Geometric Path (Matrix Animation).

For the complete sample, see Path Animation Sample.

See also