<Window x:Class="WpfApp99.MainWindow"
        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:local="clr-namespace:WpfApp99"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
		mc:Ignorable="d"
        Title="MainWindow" 
		Height="500" Width="1009">

	<Window.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="pack://application:,,,/WpfApp99;component/ResourceTemplate.xaml" />
			</ResourceDictionary.MergedDictionaries>

			<local:MainWindowViewModel x:Key="MainWindowViewModel" />

            <DataTemplate x:Key="UserControlMain">
				<local:UserControlMain DataContext="{StaticResource MainWindowViewModel}" />
			</DataTemplate>
			<DataTemplate x:Key="ATemplate">
                <local:UserControlA DataContext="{StaticResource MainWindowViewModel}" />
			</DataTemplate>
			<DataTemplate x:Key="BTemplate">
                <local:UserControlB DataContext="{StaticResource MainWindowViewModel}" />
			</DataTemplate>
			<DataTemplate x:Key="CTemplate">
                <local:UserControlC DataContext="{StaticResource MainWindowViewModel}" />
			</DataTemplate>

			<local:NavigationViewContentTemplateSelector x:Key="NavigationViewContentTemplateSelector" 
														 UserControlMain="{StaticResource UserControlMain}" 
														 ATemplate="{StaticResource ATemplate}" 
														 BTemplate="{StaticResource BTemplate}"
														 CTemplate="{StaticResource CTemplate}"
														 />
		</ResourceDictionary>
	</Window.Resources>

	<Grid>
		<telerik:RadNavigationView	x:Name="radNavigationView" DisplayMode="Expanded" AutoChangeDisplayMode="False"
									SelectedIndex="0" PaneHeader="Header">
			<telerik:RadNavigationView.Items>
				<telerik:RadNavigationViewItem Content="MainView">
					<telerik:RadNavigationViewItem.Icon>
						<telerik:RadGlyph Glyph="&#xe303;" FontSize="16"/>
					</telerik:RadNavigationViewItem.Icon>
				</telerik:RadNavigationViewItem>

				<telerik:RadNavigationViewItem Content="Hierarchy 1" IsSelectable="False">
					<telerik:RadNavigationViewItem.Icon>
						<telerik:RadGlyph Glyph="&#xe506;" FontSize="16"/>
					</telerik:RadNavigationViewItem.Icon>
					<telerik:RadNavigationViewItem.Items>
						<telerik:RadNavigationViewItem Content="UserControrl A" />
						<telerik:RadNavigationViewItem Content="UserControrl B" />
					</telerik:RadNavigationViewItem.Items>
				</telerik:RadNavigationViewItem>

				<telerik:RadNavigationViewItem Content="Hierarchy 2" IsSelectable="False">
					<telerik:RadNavigationViewItem.Icon>
						<telerik:RadGlyph Glyph="&#xe400;" FontSize="16"/>
					</telerik:RadNavigationViewItem.Icon>
					<telerik:RadNavigationViewItem.Items>
						<telerik:RadNavigationViewItem Content="UserControrl C"/>
					</telerik:RadNavigationViewItem.Items>
				</telerik:RadNavigationViewItem>

			</telerik:RadNavigationView.Items>
			
			<telerik:RadNavigationView.Content>
				<ContentControl Content="{Binding SelectedItem, ElementName=radNavigationView}" ContentTemplateSelector="{StaticResource NavigationViewContentTemplateSelector}" />
			</telerik:RadNavigationView.Content>

		</telerik:RadNavigationView>
	</Grid>
</Window>
