My friend and colleague Jared Bienz over on the ISV Evangelism Team just released a new project today out on CodePlex called Transitionals. In the wake of all the recent upsurgence of interest in WPF, this cool effect couldn’t have come at a better time for most of us. As described on the Transitionals project page, the Transitionals library allows a WPF developer to add cool object transition effects, just like those used in Video Editing and in PowerPoint (ok - sometimes this gets over used, but it can be tastefully done). Some of the effects in the first release of this open source project include Checkerboard, Diagonal Wipe,Melt, Door, Dots, Double Rotate, Explosion, Fade and Blur and many more! Of course, the entire library is extensible, so you can define your own Transitions and use them in your own applications.
The Transitions library integrates into your WPF application at the XAML level. Adding a transition effect is easy:
xmlns:trans="clr-namespace:Transitionals;assembly=Transitionals"
xmlns:transc="clr-namespace:Transitionals.Controls;assembly=Transitionals"
xmlns:transt="clr-namespace:Transitionals.Transitions;assembly=Transitionals"
xmlns:refl="clr-namespace:System.Reflection;assembly=mscorlib"
<transc:TransitionElement x:Name="TransitionBox">
<transc:TransitionElement.Transition>
<transt:RotateTransition Angle="45" />
</transc:TransitionElement.Transition>
</transc:TransitionElement>
<transc:TransitionElement.TransitionSelector>
<trans:RandomTransitionSelector>
<transt:DoorTransition/>
<transt:DotsTransition/>
<transt:RollTransition/>
</trans:RandomTransitionSelector>
</transc:TransitionElement.TransitionSelector>
</TransitionElement>
UserControlA userControlA = new UserControlA();
UserControlB userControlB = new UserControlB();
private void AButton_Click(object sender, RoutedEventArgs e)
{
TransitionBox.Content = userControlA;
}
private void BButton_Click(object sender, RoutedEventArgs e)
TransitionBox.Content = userControlB;
To get more information about the Transitionals project, be sure to check out these fine resources:
Now - someone needs to build a "blink" and a "gradient wipe" transition so that the circle will be complete...