using System.Windows;
using System.Windows.Controls;
using Telerik.Windows.Controls;

namespace WpfApp99
{
    public class NavigationViewContentTemplateSelector : DataTemplateSelector
    {
        public DataTemplate UserControlMain { get; set; }
        public DataTemplate ATemplate { get; set; }
        public DataTemplate BTemplate { get; set; }
        public DataTemplate CTemplate { get; set; }

        public override DataTemplate SelectTemplate(object item, DependencyObject container)
        {
            var navigationItemModel = item as RadNavigationViewItem;

            switch (navigationItemModel.Content)
            {
                case "MainView": return this.UserControlMain;
                case "Hierarchy 1": return this.UserControlMain;
                case "Hierarchy 2": return this.UserControlMain;

                case "UserControrl A": return this.ATemplate;
                case "UserControrl B": return this.BTemplate;
                case "UserControrl C": return this.CTemplate;
                default:
                    return this.UserControlMain;
            }
        }
    }

}
