You have already learned how to animate the color and size of an element, but what about its position? Could you create some animations regarding the location of an element? Of course! In this recipe, you will get to know how to do it.
To step through this recipe, you need only the automatically generated project.
To prepare the example that animates the square position, perform the following steps:
MainPage.xamlfile, as follows:
<Page (...)> <Page.Resources> <Storyboard x:Name="RectangleMove"> <DoubleAnimation Storyboard.TargetName="RectangleMain" Storyboard.TargetProperty="(Canvas.Left)" ...