O'Reilly logo

Illustrated WPF by Daniel Solis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. XAML

A Tree of Objects

One of the most important concepts of WPF is that the user interface is a tree of WPF class objects. That tree has a single node at the top, and each node in the tree can have zero or more child nodes.

In Chapter 2, you saw that you can use C# to instantiate WPF class objects and connect them explicitly, creating the tree.

But the tree structure is exactly the type of structure produced by an XML document. The WPF designers used that fact to create a variant of XML, called XAML, for creating trees of WPF objects. (XAML stands for eXtensible Application Markup Language.) A XAML parser interprets the XAML markup and produces the tree of WPF objects, as illustrated in Figure 4-1.

Figure 4.1. The XAML parser interprets ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required