<UserControl x:Class="TreeViewExpandByPath.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"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
    <Grid x:Name="LayoutRoot">
        
        <!--The Path will be built from the "Path" property of our the ViewModel.-->
         <telerikNavigation:RadTreeView Margin="8" x:Name="radTreeView" telerik:TextSearch.TextPath="Path">
           <telerikNavigation:RadTreeView.ItemTemplate>
                <telerik:HierarchicalDataTemplate ItemsSource="{Binding Children}">
                    <TextBlock Text="{Binding Header}" />
                </telerik:HierarchicalDataTemplate>
            </telerikNavigation:RadTreeView.ItemTemplate>
        </telerikNavigation:RadTreeView>

        <!--The TextSearch.Text property will be used as a path for the item.-->
        <!--<telerikNavigation:RadTreeView Margin="8" x:Name="radTreeView">
            <telerikNavigation:RadTreeViewItem Header="Sport Categories"
                    telerik:TextSearch.Text="SC">
                <telerikNavigation:RadTreeViewItem Header="Football" telerik:TextSearch.Text="F">
                    <telerikNavigation:RadTreeViewItem Header="Futsal" telerik:TextSearch.Text="F" />
                    <telerikNavigation:RadTreeViewItem Header="Soccer" telerik:TextSearch.Text="S" />
                </telerikNavigation:RadTreeViewItem>
                <telerikNavigation:RadTreeViewItem Header="Tennis" telerik:TextSearch.Text="T" />
                <telerikNavigation:RadTreeViewItem Header="Cycling" telerik:TextSearch.Text="C" />
            </telerikNavigation:RadTreeViewItem>
        </telerikNavigation:RadTreeView>-->
        
        <!--The TextSearch.TextPath property specifies a path to search the item. In this case the items 
        are TreeView items, so we can specify that their "Tag" property has to be searched.-->
        <!--<telerikNavigation:RadTreeView Margin="8" x:Name="radTreeView" telerik:TextSearch.TextPath="Tag">
            <telerikNavigation:RadTreeViewItem Header="Sport Categories"
                    Tag="SC">
                <telerikNavigation:RadTreeViewItem Header="Football" Tag="F">
                    <telerikNavigation:RadTreeViewItem Header="Futsal" Tag="F" />
                    <telerikNavigation:RadTreeViewItem Header="Soccer" Tag="S" />
                </telerikNavigation:RadTreeViewItem>
                <telerikNavigation:RadTreeViewItem Header="Tennis" Tag="T" />
                <telerikNavigation:RadTreeViewItem Header="Cycling" Tag="C" />
            </telerikNavigation:RadTreeViewItem>
        </telerikNavigation:RadTreeView>-->

    </Grid>
</UserControl>
