18.4. Supporting Visual States
The ColorPicker control is a good example of control design. Because its behavior and its visual appearance are carefully separated, other designers can develop new templates that change its appearance dramatically.
One of the reasons the ColorPicker is so simple is that it doesn't have a concept of states. In other words, it doesn't distinguish its visual appearance based on if it has focus, if the mouse is overtop, if it's disabled, and so on. The FlipPanel control in the following example is a bit different.
The basic idea behind the FlipPanel is that it provides two surfaces to host content, but only one is visible at a time. To see the other content, you "flip" between the sides. You can customize the flipping ...
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