Chapter 6. Working with Styles, Templates, Skins, and Themes

One of the most remarkable aspects of WPF is the ability to separate and customize the visual appearance of user interface elements from the built-in behavior and functionality they provide. You can do this using styles and control templates.

The recipes in this chapter describe how to:

  • Create custom visual styles for control elements (recipes 6-1 and 6-2)

  • Customize, override, inherit from, and dynamically change these visual styles (recipes 6-3, 6-4, 6-5, 6-6, 6-7, and 6-8)

  • Set a style programmatically and ignore an implicit style (recipes 6-9 and 6-10)

  • Create styles to control the appearance of items in a collection (recipes 6-11 and 6-12)

  • Create custom control templates that specify how ...

Get WPF Recipes in C# 2008: A Problem-Solution Approach 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.