Mark Tree node expandable : TreeView « Windows Presentation Foundation « C# / CSharp Tutorial

Home
C# / CSharp Tutorial
1.Language Basics
2.Data Type
3.Operator
4.Statement
5.String
6.struct
7.Class
8.Operator Overload
9.delegate
10.Attribute
11.Data Structure
12.Assembly
13.Date Time
14.Development
15.File Directory Stream
16.Preprocessing Directives
17.Regular Expression
18.Generic
19.Reflection
20.Thread
21.I18N Internationalization
22.LINQ
23.GUI Windows Forms
24.Windows Presentation Foundation
25.Windows Communication Foundation
26.Workflow
27.2D
28.Design Patterns
29.Windows
30.XML
31.XML LINQ
32.ADO.Net
33.Network
34.Directory Services
35.Security
36.unsafe
C# / C Sharp
C# / C Sharp by API
C# / CSharp Open Source
C# / CSharp Tutorial » Windows Presentation Foundation » TreeView 
24.51.6.Mark Tree node expandable
<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>
WPF Mark Tree Node Expandable
24.51.TreeView
24.51.1.TreeView uses SelectedValuePath property to provide a SelectedValue for the SelectedItem.TreeView uses SelectedValuePath property to provide a SelectedValue for the SelectedItem.
24.51.2.TreeView with DataSourceTreeView with DataSource
24.51.3.TreeView And TreeViewItemTreeView And TreeViewItem
24.51.4.Create a Tree and add childrenCreate a Tree and add children
24.51.5.Add Ellipse, TextBlock to a TreeAdd Ellipse, TextBlock to a Tree
24.51.6.Mark Tree node expandableMark Tree node expandable
24.51.7.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.
24.51.8.Handles the Selected event for all TreeViewItemsHandles the Selected event for all TreeViewItems
24.51.9.Set TreeView with TreeViewItemSet TreeView with TreeViewItem
24.51.10.View and Select Items Using a TreeView and Select Items Using a Tree
24.51.11.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.