Files
docs-desktop/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-animate-a-rectangle.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

1.4 KiB

title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
title ms.date dev_langs helpviewer_keywords ms.assetid
How to: Animate a Rectangle 03/30/2017
csharp
vb
animation [WPF], rectangles
rectangles [WPF], animating
572ffb95-790d-4ace-adbf-b2ea8a90e75b

How to: Animate a Rectangle

This example shows how to animate changes to the size and position of a rectangle.

Example

The following example uses an instance of the xref:System.Windows.Media.Animation.RectAnimation class to animate the xref:System.Windows.Media.RectangleGeometry.Rect%2A property of a xref:System.Windows.Media.RectangleGeometry, which animates changes to the size and position of the rectangle.

[!code-csharpBasicAnimations_snip#RectAnimationWholePage] [!code-vbBasicAnimations_snip#RectAnimationWholePage]

See also