Chapter 11. The Three Templates

The word “template” generally refers to a kind of pattern or mold used for creating identical or similar objects. In the Windows Runtime, a template is a chunk of XAML that Windows uses to create a visual tree of elements. This might not seem so astonishing. You’ve seen Windows turning XAML into visual trees since the first pages of this book. But templates almost always contain data bindings, so a single template can result in many visual trees of somewhat different appearances based on the binding sources. For this reason, templates are very often defined as resources so that they can be shared and used multiple times.

The title of this chapter refers to three templates. These correspond to the three classes that ...

Get Programming Windows®, Six 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.