<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      HorizontalAlignment="Center" VerticalAlignment="Center">

<!-- Example 5-21. TreeView control -->

<TreeView>
  <TreeViewItem Header="First top-level item" IsExpanded="True">
    <TreeViewItem Header="Child" />
    <TreeViewItem Header="Another child" IsExpanded="True">
      <TreeViewItem Header="Grandchild" />
      <TreeViewItem Header="Grandchild 2" />
    </TreeViewItem>
    <TreeViewItem Header="A third child" />
  </TreeViewItem>

  <TreeViewItem Header="Second top-level item">
    <TreeViewItem Header="Child a" />
    <TreeViewItem Header="Child b" />
    <TreeViewItem Header="Child c" />
  </TreeViewItem>

  <TreeViewItem IsExpanded="True">
    <TreeViewItem.Header>
      <StackPanel Orientation="Horizontal">
        <Ellipse Fill="Blue" Width="15" Height="15" />
                <TextBlock Text="Third top-level item" />
                <Ellipse Fill="Blue" Width="15" Height="15" />
            </StackPanel>
        </TreeViewItem.Header>

        <TreeViewItem Header="Child a" />
        <TreeViewItem Header="Child b" />
        <TreeViewItem Header="Child c" />
    </TreeViewItem>
</TreeView>

<!-- End of Example 5-21. -->

</Page>