<UserControl x:Class="RadTreeViewWithWCF.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
	xmlns:core="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
    xmlns:local="clr-namespace:RadTreeViewWithWCF"
    
    Width="700" Height="500">
    
	<UserControl.Resources>

		<local:HierarchicalDataSource x:Key="Source" />

		<core:HierarchicalDataTemplate x:Key="NodeTemplate" ItemsSource="{Binding Children}">
			<core:HierarchicalDataTemplate.HeaderTemplate>
				<DataTemplate>
					<TextBlock Text="{Binding NodeText}" TextWrapping="Wrap" Width="400"/>
				</DataTemplate>
			</core:HierarchicalDataTemplate.HeaderTemplate>
		</core:HierarchicalDataTemplate>

	</UserControl.Resources>

	<Grid>

		<telerik:RadTreeView
			HorizontalAlignment="Left"
			VerticalAlignment="Top"
			ItemsSource="{Binding Source={StaticResource Source}}"
            ItemTemplate="{StaticResource NodeTemplate}" 
            />
	</Grid>
</UserControl>
