.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 >> Code Snippets >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

How to associate the links with the Silverlight treeview items

Posted By:Vijai Anand. R       Posted Date: May 14, 2011    Points: 40    Category: SharePoint    URL: http://www.dotnetspark.com  

In this we will be seeing how to associate the links with the Silverlight treeview items
 

Silverlight TreeView Control:

http://www.c-sharpcorner.com/UploadFile/anavijai/7011/
http://www.c-sharpcorner.com/UploadFile/anavijai/7026/


Associate Links with the Silverlight Treeview items:

MainPage.xaml

<
UserControl xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" x:Class="SilverlightTreeViewControl.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<sdk:TreeView x:Name="TreeViewControl">
<sdk:TreeViewItem>
<sdk:TreeViewItem.Header>
<HyperlinkButton Content="Menu" NavigateUri="http://www.google.co.in/"/>
sdk:TreeViewItem.Header>
<sdk:TreeViewItem>
<sdk:TreeViewItem.Header>
<HyperlinkButton Content="Item1" NavigateUri="http://www.google.co.in/"/>
sdk:TreeViewItem.Header>
sdk:TreeViewItem>
<sdk:TreeViewItem>
<sdk:TreeViewItem.Header>
<HyperlinkButton Content="Item2" NavigateUri="http://www.google.co.in/"/>
sdk:TreeViewItem.Header>
sdk:TreeViewItem>
<sdk:TreeViewItem>
<sdk:TreeViewItem.Header>
<HyperlinkButton Content="Item3" NavigateUri="http://www.google.co.in/"/>
sdk:TreeViewItem.Header>
sdk:TreeViewItem>
sdk:TreeViewItem>
sdk:TreeView>
Grid>
UserControl>


Output:


SilverlightTreeView.png
 


     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

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