ui::TransitionStoryboard¶
Header: winui/ui/Animation.hpp.
The storyboard a theme or navigation transition builds for one element: key-framed tracks over its TransitionTargetState, started delay late (a stagger), scaling about scale_origin. When it ends the transition target goes back to identity.
Example:
// A custom "nudge": slide 12 DIPs right and back over 200 ms.
auto element = std::make_unique<ui::RectangleControl>();
ui::TransitionStoryboard nudge;
nudge.tracks.push_back({ui::TransitionChannel::TranslateX,
{ui::KeyFrame::linear(0ms, 0.0f), ui::KeyFrame::linear(100ms, 12.0f),
ui::KeyFrame::linear(200ms, 0.0f)}});
element->run_transition(std::move(nudge), [] { /* back at rest */ });
// Or one of the stock ones:
element->run_transition(ui::transition_storyboards::popup_in(ui::Point{0.0f, 40.0f}));
tracks¶
The key-framed tracks.
delay¶
Start delay (a stagger).
scale_origin¶
Scale origin as a fraction of the size.
duration¶
Total length: the delay plus the longest track.
empty¶
True when there is nothing to play (no tracks), e.g. for NoPageTransition.