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
X

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now