Before going into fun topics, let me give some information about myself. I started to play with WPF about 1 year ago. Since the beginning, I fell in love with this new technology and the more I work with it, the more I like it. Today, I consider I’m still a newbie in the WPF world and this is my first article, so please forgive me if I do some mistakes. Please also forgive my English as this is not my natural language (I’m French).
In this article, I describe a technique that I’ve been using in order to use navigation pages in a WPF application. In the next section, I’m going to give more details about what I mean by “navigation pages”.
Many applications are made up several screens. Here when I use the word “screen” I mean a view in the application. For example, you might have a view as a welcome screen and several other views.
In this case, you would like the current screen to display the current view, but you also need a technique to switch from one view to another. If you also want to improve the user experience, you might want to have some kind of animation when the user switches from one view to another.
A possible animation is to use a “slide effect”:
I’m going to describe 2 techniques that could be used to achieve this behaviour. I will also show you why the last one is better than the first one.