Transition Class
An object that animates the target control.
Namespace: DevExpress.Utils.Animation
Assembly: DevExpress.Utils.v24.1.dll
NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core
Declaration
Remarks
To animate a control state change, do the following.
Create a new
Transition
object and place it to the TransitionManager.Transitions collection.Assign a control you need to animate to the Control property.
Create a specific effect from the DevExpress.Utils.Animation namespace (e.g., the SlideTransition effect) and assign it to the Transition.TransitionType property.
Customize required transition and effect settings: easing function, waiting indicator visibility, animation speed, etc.
Enable the TransitionManager.UseDirectXPaint property if you want smoother animations that employ the DirectX engine.
Call the TransitionManager.StartTransition(Control) method to launch the animation effect. The Transition Manager will call the Control.DrawToBitmap method to take a snapshot of the animated control and display it above this control.
If you use the ZoomTransition effect, you need to create a ZoomTransitionSettings object, customize its settings, and assign this object to the ZoomTransition.ActiveSettings property.
void RunZoomInAnimation(NodeNavigationInfo activeNode, Action action) {
var zoomTransition = this.transitionManager1.GetTransition<ZoomTransition>(this.gridControl1);
this.transitionManager1.StartTransition(this.gridControl1);
zoomTransition.ActiveSettings = new ZoomTransitionSettings() {
SourceBounds = activeNode.SourceBounds, TargetBounds = GridClientBounds, Direction = ZoomTransitionDirection.ZoomIn
};
action();
this.transitionManager1.EndTransition();
}
Optionally, handle the TransitionManager.CustomTransition event to customize the animation. For instance, you can provide a custom easing function or change the animation region.
When a control state has changed, call the TransitionManager.EndTransition method to take the second snapshot and perform the animated transition from the first snapshot to this final image.
Handle the optional TransitionManager.BeforeTransitionStarts and TransitionManager.AfterTransitionEnds events to perform custom actions before and after the transition.
Examples
How to use TransitionManager and DocumentManager with TabbedView
How to animate control with the DirectX-based ZoomTransition - GitHub