Email: Password:       Forgot Password 
    .netCodeSG
A Saarsha Group Online Community for dot net codes group like C#, Asp.NET, VB.NET, Sharepoint, JavaScript, JQuery, Ajax, SQL, WCF, WPF.
 
TECHNOLOGIES:
 

WPF TreeView Control

Article:
Viewed:  1208 
Posted On:  02/10/2013 01:24:50 
How to use WPF TreeView Control..? 

In this article I am going to explain TreeView control in WPF.

My XAML is:

<Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="WPF: Tree View" Height="300" Width="300">
   
        <Grid Background="AliceBlue">
            <TreeView Height="200" Background="WhiteSmoke"
                  HorizontalAlignment="Left"
                  Margin="12,12,0,0"
                  Name="treeView1"
                  VerticalAlignment="Top"
                  Width="250">
                <TreeViewItem Header="India">
                    <TreeViewItem Header="New Delhi" />
                    <TreeViewItem Header="Mumbai" />
                    <TreeViewItem Header="Banglore" />
                </TreeViewItem>
                <TreeViewItem Header="USA" >
                    <TreeViewItem Header="New York" />
                    <TreeViewItem Header="Phoenix" />
                </TreeViewItem>
                <TreeViewItem Header="Australia" >
                    <TreeViewItem Header="Sydeny" />
                </TreeViewItem>
            </TreeView>
        </Grid>
</Window>


TreeView control in WPF 1.png 

Image 1.

TreeView control in WPF 2.png

Image 2.

  Comment:
         HOME   |   Submit Article   |   Contact Us   |   About Us   |   Terms & Condition   |   Advertise With us