Silverlight 3 includes a navigation framework that allows for partitioning your application into separate pages and provides easy page navigation with integrated browser's back/forward button support. If you have the Silverlight 3 Tools for Visual Studio installed, the Silverlight Navigation Application template provides a great start for building applications using the navigation framework. While working recently on a navigation application, there was this requirement for animated page transitions. Moving from one page to another must look pretty and if possible should include advanced animations with pages flying in, fading out, etc. So I started investigating if and how this was possible with the navigation framework. And the answer is that it is very, very easy and it does not require a single line of code. While devising a solution for animating transitions I immediately had this new
TransitioningContentControl class (available in the
SL3 Toolkit) in mind. The
TransitioningContentControl is a
ContentControl that provides transition animation when the
Content property of the control is changed. Sounds like a perfect candidate for my animation page navigation solution, but how to incorporate the
TransitioningContentControl in the navigation framework? The answer is: using custom control templates. Pages are hosted in a
Frame control ...