Skip to main content

AnimatedSwitcher

A control that by default does a cross-fade between a new control and the control previously set on the AnimatedSwitcher as a content.

Examples​

Live example

Animated switching between two containers with scale effect​

python/controls/animations/animated-switcher/animated-switcher.py
loading...

Properties​

content​

The content to display. When the content changes, the AnimatedSwitcher will animate the transition from the old content to the new one.

Value is of type Control.

duration​

The duration, in milliseconds, of the transition from the old content value to the new one.

Value is of type int defaults to 1000 milliseconds.

reverse_duration​

The duration, in milliseconds, of the transition from the new content value to the old one.

Value is of type int and defaults to 1000 milliseconds.

switch_in_curve​

The animation curve to use when transitioning in a new content.

Value is of type AnimationCurve and defaults to AnimationCurve.LINEAR.

switch_out_curve​

The animation curve to use when transitioning a previous content out.

Value is of type AnimationCurve and defaults to AnimationCurve.LINEAR.

transition​

An animation type to transition between new and old content.

Value is of type AnimatedSwitcherTransition and defaults to AnimatedSwitcherTransition.FADE.