The well-known "turnstile" transition, featured in the Windows Phone 7 start screen and in some applications that come with the phone. This animation consists in rotating each element of the screen in 3D in succession in such a way that the whole page seems to move fluidly – an image is worth a thousand words:
In this effect, there’s also an element of randomness – the animation is slightly different every time. It’s also important to note that the turnstile animation has 4 possible directions:
This article is divided in two parts. In the first part, we’ll deconstruct the effect in the simplest possible way. To do that; we’ll reproduce the effect in a "controlled scenario", in which we build all the elements knowing their positions. In the second part, a refactored and reusable version of this effect will be presented in the form of an ItemsControl that can use any panel for positioning the elements. In one sentence, "Make it work, then make it right".