By looking at Worpress statistics for my blog, I realized that many people were coming here by searching keywords like “animation”, “transition”, etc. A couple of month ago, I wrote an article about a control that I created: the ContentSlider control. The article described a control that could be used to create an animation when switching from one page to another, but it was very basic.
If you’re looking for a more complete solution, I recommend you to take a look at the FluidKit library created by Paven Podila. The FluidKit library contains very powerful control, the most known is probably the ElementFlow control that is similar to Apple’s famous CoverFlow functionality:
FluidKit also contains a TransitionPresenter control that is an extended and more powerful version of my ContentSlider control. The TransitionPresenter control comes with 4 transitions that you can easily use in your application (Cube, Flip, Slide, Genie):
Pavan really did a great job with the FluidKit library. Go ahead a grab the source to play with it and learn very cool stuff about WPF !
In my very first article, I wrote an article about an implementation of a solution allowing to use transition (using a sliding effect) between views in a WPF application.
As a reminder, here when I talk about “views” I mean a screen of the application. One of this screen could be used as a login screen, the other one to setup parameters, etc.
In this article, I introduce a CustomControl that I build in order to re-use the implementation I described in an easy way. Basically, using this control, you can write something like:
All the specific stuff related to the transition (the animation, the use of a VisualBrush…) is handled INSIDE the control so that it is completely transparent to use.
From C# code point of view, you’ll need to use 3 functions:
The first one (PrepareSlide) must be called right before changing the content of the view. It will create a “snapshot” of the view so that it will become possible to animate it.
The next two one should be called to slide the content to the left (or to the right).
I hope you’ll enjoy it. Here is a solution containing the control with example.
Article updated ! You can now download the example as a Visual Studio 2008 solution.
Article updated ! For a more complete solution, please take a look at this post
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.
Continue reading Using animated navigation pages in a WPF application