Chapter 13. Control Templates

Separating Appearance from Behavior

One of the major features of WPF is that it allows you unprecedented control of the way your applications looks. This extends even to the appearance of the standard controls.

So far, you've seen that you can change some of the basic characteristics of controls, such as their content, background colors, and margin characteristics. But it goes much deeper than that. You can change the entire look of a control—without changing its fundamental behavior.

The reason for this is that the appearance of a control isn't hard-coded into the control itself, as it has been in previous frameworks. In previous frameworks, the control classes were implemented as wrappers around the controls built ...

Get Illustrated WPF now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.