Skip to content

ui::BrushTransition

Header: winui/ui/Animation.hpp.

Animates a background color change (a spec's background_transition) linearly in RGB over duration, from the color on screen at that moment.

Example:

window.set_content(ui::VerticalStack{
    .background            = ui::Color::from_argb(0xFF202020),
    .background_transition = ui::BrushTransition{.duration = 300ms},
    .content               = {ui::Text{.text = "Fades on color changes"}},
});

Field Type Default
duration Duration {150.0} Length of the blend (at least 1 ms).