As in the case of color, you can also easily animate the size of an element. In this recipe, you will learn how to animate the width and height of a rectangle and how to automatically reverse the animation when it is completed.
To step through this recipe, you need only the automatically generated project.
To prepare the example that animates the size of a rectangle, perform the following steps:
MainPage.xamlfile, as follows:
<Page (...)> <Page.Resources> <Storyboard x:Name="RectangleResize"> <DoubleAnimation Storyboard.TargetName="RectangleMain" Storyboard.TargetProperty="Width" ...