Styles and Templates

The capability to customize the look of a control in WPF, without losing any of its built-in functionality, is one of the huge advantages that WPF brings to the development scene. Consider the two slider controls in Figure 21.16. The top is the default style, and the bottom represents a restyled slider. Functionality is identical. We have simply changed the appearance of the control.

Image

FIGURE 21.16 The standard slider (top) and a restyled slider (bottom).

Style is an actual class (in the System.Windows namespace) that is used in association with a control; it groups property values together to enable you, as a developer, ...

Get Microsoft Visual Studio 2015 Unleashed, Third Edition 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.