Skip to content

ui::TransitionTargetState

Header: winui/ui/Animation.hpp.

The opacity, scale and offset a transition or a navigation transition animates. They apply on top of the element's own opacity, scale, rotation and translation, and reset when the transition ends. The scale is about scale_origin, relative to the element's size.

opacity

float opacity = 1.0f

Multiplied into the element's own opacity, 0..1.

translate

Point translate {}

Offset in DIPs, applied after the scale.

scale_x

float scale_x = 1.0f

Horizontal scale factor.

scale_y

float scale_y = 1.0f

Vertical scale factor.

scale_origin

Point scale_origin {0.5f, 0.5f}

Scale origin as a fraction of the element's size.

is_identity

bool is_identity() const

True at rest: opaque, unmoved and unscaled (scale_origin is irrelevant then).