Add Ellipse, TextBlock to a Tree : TreeView « Windows Presentation Foundation « C# / C Sharp

Home
C# / C Sharp
1.2D Graphics
2.Class Interface
3.Collections Data Structure
4.Components
5.Data Types
6.Database ADO.net
7.Design Patterns
8.Development Class
9.Event
10.File Stream
11.Generics
12.GUI Windows Form
13.Language Basics
14.LINQ
15.Network
16.Office
17.Reflection
18.Regular Expressions
19.Security
20.Services Event
21.Thread
22.Web Services
23.Windows
24.Windows Presentation Foundation
25.XML
26.XML LINQ
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source
C# / C Sharp » Windows Presentation Foundation » TreeViewScreenshots 
Add Ellipse, TextBlock to a Tree
Add Ellipse, TextBlock to a Tree
    
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      HorizontalAlignment="Center" VerticalAlignment="Center">

<TreeView>
  <TreeViewItem Header="A" IsExpanded="True">
    <TreeViewItem Header="B" />
    <TreeViewItem Header="C" IsExpanded="True">
      <TreeViewItem Header="D" />
      <TreeViewItem Header="E" />
    </TreeViewItem>
    <TreeViewItem Header="F" />
  </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>
</Page>

   
    
    
    
  
Related examples in the same category
1.TreeView uses SelectedValuePath property to provide a SelectedValue for the SelectedItem.TreeView uses SelectedValuePath property to provide a SelectedValue for the SelectedItem.
2.TreeView with DataSourceTreeView with DataSource
3.TreeView And TreeViewItemTreeView And TreeViewItem
4.Create a Tree and add childrenCreate a Tree and add children
5.Mark Tree node expandableMark Tree node expandable
6.Bind a TreeView to a data source and use DataTemplate objects to customize the TreeView.Bind a TreeView to a data source and use DataTemplate objects to customize the TreeView.
7.Handles the Selected event for all TreeViewItemsHandles the Selected event for all TreeViewItems
8.Set TreeView with TreeViewItemSet TreeView with TreeViewItem
9.View and Select Items Using a TreeView and Select Items Using a Tree
10.Get selected tree node itemGet selected tree node item
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.