Prism v4 Navigation with Animation

Topics: Prism v4 - WPF 4
Jan 24, 2011 at 8:56 PM


Is there a way to apply animation using the NavigationService when navigating from one view to another like what Karl did in his BBQShack project or what Bill Hollys demonstrated in his video?

Any hint is much appreciated.



Jan 25, 2011 at 6:07 PM

Hi Antonio,

One possible way to achieve this is to create a custom control that inherits from (for example) a content control or an items control, but which implements logic for animating the view switching inside it. That control would act as the region in which you would navigate. Therefore, the animation logic would be decoupled from the navigation logic.

As an example of this, in the Stock Trader Reference Implementation QuickStart, you can find the AnimatedTabControl class (which inherits from the TabControl class), which shows you an implementation for the transition between the tabs of the control. You could use this code as a guide to the approach of the animations your application requires.

Also, you might find handy the Animation Overview article on MSDN here.

I hope you find this information useful.


Miguel Bronzovic