<UserControl x:Class="TreeViewDNDWithRia.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:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             d:DesignHeight="300"
             d:DesignWidth="400"
             mc:Ignorable="d">
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.Resources>
            <telerik:HierarchicalDataTemplate x:Key="ProductLeveltemplate">
                <TextBlock FontSize="14" 
                           FontWeight="Bold"
                           Foreground="DeepSkyBlue"
                           Text="{Binding Name}" />
            </telerik:HierarchicalDataTemplate>

            <telerik:HierarchicalDataTemplate x:Key="CategoryLevelTemplate" 
                                              ItemsSource="{Binding Products}"
                                              ItemTemplate="{StaticResource ProductLeveltemplate}">
                <TextBlock FontSize="16" 
                           FontWeight="Bold"
                           Foreground="MediumBlue"
                           Text="{Binding Name}" />
            </telerik:HierarchicalDataTemplate>
        </Grid.Resources>

        <telerik:RadTreeView x:Name="treeView" 
                             HorizontalAlignment="Center"
                             IsDragDropEnabled="True"
                             ItemsSource="{Binding Categories}"
                             ItemTemplate="{StaticResource CategoryLevelTemplate}" />
    </Grid>
</UserControl>
