Responding to Visual State Changes
The states defined by each control are grouped into mutually exclusive state groups. For example, Button has four states in a group called CommonStates—Normal, PointerOver, Pressed, and Disabled—and three states in a group called FocusStates—Unfocused, Focused, and PointerFocused. At any time, Button is in one state from every group, so it is Normal and Unfocused by default. This grouping mechanism exists to avoid a long list of states meant to cover every combination of independent properties (such as NormalUnfocused, NormalFocused, PointerOverUnfocused, PointerOverFocused, and so on).
A template for Button can express modifications to make to its elements when transitioning to each state. This is done by assigning ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access