May 2010
Intermediate to advanced
1272 pages
61h 18m
English
TreeViewThe TreeView is another important control, and WPF provides its own implementation that exposes a TreeView.Items collection where you nest nodes. Each node is represented by a TreeViewItem object. You can build complex items as in the following example:

The text in the node is specified with the Header property while additional information can be assigned with the Tag property. Assigning the Name property is also useful because you can interact with nodes in managed code. To add nodes at runtime you simply create an instance of the TreeViewItem class and then add it to the specified node as demonstrated here:
Figure 32.23 shows the result ...
Read now
Unlock full access