Chapter 21. Using Control Templates

What You’ll Learn in This Hour:

  • The basics of making control templates

  • Why you would want to use control templates

  • Examples of making control templates

  • Solutions for problems that you’ll encounter when authoring your own templates

Control templates are used to define the actual look of a control. With control templates we can make a list box filled with the names of countries look like a map of the world, without affecting the behavior of the list box programmatically. After we cover the basic concepts, you’ll find that control templates are easy to understand. The difficulty in working with them is in the details of the individual controls. We go through a few examples in this hour so that you’ll be well equipped ...

Get Sams Teach Yourself WPF in 24 Hours 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.