.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> Silverlight >> Post New Resource Bookmark and Share   

 Subscribe to Articles

TreeView control In Silverlight Application

Posted By:Diptimaya Patra       Posted Date: April 07, 2010    Points: 25    Category: Silverlight    URL: http://www.dotnetspark.com  

TreeView control In Silverlight Application. In this article we will explore about Tree View control in Silverlight in detail.
 

Introduction

In this article we will explore about Tree View control in Silverlight 3.

You can also refer to my another article in TreeView with expand collapse here

Crating Silverlight Project

Fire up Visual Studio 2008 and create a Silverlight Application. Name it as TreeViewSL3.

image1.gif

The TreeView control displays data in a hierarchical manner.

Open the solution in Expression Blend 3.

Go ahead and a Tree View control to your application.

I have changed the Background to Linear Brush.

To add TreeView Item to the Tree View, just right click on it and add TreeViewItem.

image2.gif

Add several, and if you want to add children of any parent then select the particular TreeViewItem and add another Treeview Item.

I have created the below hierarchy:

image3.gif

If you see the design view it will look similar to the following:

image4.gif

Here is the XAML code behind for the TreeView:


    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

Now if you run the application you can expand or collapse a particular TreeViewItem.

image5.gif

This article is very basic to understand the Tree View Control in Silverlight 3. We will explore more on this in forth coming articles.

Enjoy Coding.
 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend