ui::testing::VisualStates¶
Header: winui/testing/VisualStates.hpp.
Reads the interaction state a control draws in (Normal, Hover, Pressed, Disabled), which only a test looks at. The controls keep it protected; the free functions below are the way in.
Example:
ui::ButtonControl button{"OK"};
button.set_enabled(false);
REQUIRE(ui::testing::visual_state(button) == ui::ButtonState::Disabled);