/// <summary> /// Register viewmodel types with <seealso cref="DataTemplate"/> for a view /// and return all definitions with a <seealso cref="PanesTemplateSelector"/> instance. /// </summary> /// <param name="paneSel"></param> /// <returns></returns> private PanesTemplateSelector RegisterDataTemplates(PanesTemplateSelector paneSel) { // Register Log4Net DataTemplates var template = ResourceLocator.GetResource <DataTemplate>( Assembly.GetAssembly(typeof(Log4NetViewModel)).GetName().Name, "DataTemplates/Log4NetViewDataTemplate.xaml", "Log4NetDocViewDataTemplate") as DataTemplate; paneSel.RegisterDataTemplate(typeof(Log4NetViewModel), template); template = ResourceLocator.GetResource <DataTemplate>( Assembly.GetAssembly(typeof(Log4NetMessageToolViewModel)).GetName().Name, "DataTemplates/Log4NetViewDataTemplate.xaml", "Log4NetMessageViewDataTemplate") as DataTemplate; paneSel.RegisterDataTemplate(typeof(Log4NetMessageToolViewModel), template); template = ResourceLocator.GetResource <DataTemplate>( Assembly.GetAssembly(typeof(Log4NetToolViewModel)).GetName().Name, "DataTemplates/Log4NetViewDataTemplate.xaml", "Log4NetToolViewDataTemplate") as DataTemplate; paneSel.RegisterDataTemplate(typeof(Log4NetToolViewModel), template); return(paneSel); }
/// <summary> /// Register viewmodel types with <seealso cref="DataTemplate"/> for a view /// and return all definitions with a <seealso cref="PanesTemplateSelector"/> instance. /// </summary> /// <param name="paneSel"></param> /// <returns></returns> private PanesTemplateSelector RegisterDataTemplates(PanesTemplateSelector paneSel) { // FileStatsView var template = ResourceLocator.GetResource <DataTemplate>( Assembly.GetAssembly(typeof(FileStatsViewModel)).GetName().Name, "DataTemplates/FileStatsViewDataTemplate.xaml", "FileStatsViewTemplate") as DataTemplate; paneSel.RegisterDataTemplate(typeof(FileStatsViewModel), template); // RecentFiles template = ResourceLocator.GetResource <DataTemplate>( Assembly.GetAssembly(typeof(RecentFilesTWViewModel)).GetName().Name, "DataTemplates/RecentFilesViewDataTemplate.xaml", "RecentFilesViewDataTemplate") as DataTemplate; paneSel.RegisterDataTemplate(typeof(RecentFilesTWViewModel), template); // FileExplorer template = ResourceLocator.GetResource <DataTemplate>( Assembly.GetAssembly(typeof(FileExplorerViewModel)).GetName().Name, "DataTemplates/FileExplorerViewDataTemplate.xaml", "FileExplorerViewDataTemplate") as DataTemplate; paneSel.RegisterDataTemplate(typeof(FileExplorerViewModel), template); return(paneSel); }
/// <summary> /// Register viewmodel types with <seealso cref="DataTemplate"/> for a view /// and return all definitions with a <seealso cref="PanesTemplateSelector"/> instance. /// </summary> /// <param name="paneSel"></param> /// <returns></returns> private PanesTemplateSelector RegisterDataTemplates(PanesTemplateSelector paneSel) { // StartPageView var template = ResourceLocator.GetResource <DataTemplate>( Assembly.GetAssembly(typeof(StartPageViewModel)).GetName().Name, "DataTemplates/StartPageViewDataTemplate.xaml", "StartPageViewDataTemplate") as DataTemplate; paneSel.RegisterDataTemplate(typeof(StartPageViewModel), template); //EdiView template = ResourceLocator.GetResource <DataTemplate>( Assembly.GetAssembly(typeof(EdiViewModel)).GetName().Name, "DataTemplates/EdiViewDataTemplate.xaml", "EdiViewDataTemplate") as DataTemplate; paneSel.RegisterDataTemplate(typeof(EdiViewModel), template); // MiniUml template = ResourceLocator.GetResource <DataTemplate>( Assembly.GetAssembly(typeof(MiniUmlViewModel)).GetName().Name, "DataTemplates/MiniUMLViewDataTemplate.xaml", "MiniUMLViewDataTemplate") as DataTemplate; paneSel.RegisterDataTemplate(typeof(MiniUmlViewModel), template); return(paneSel); }
/// <summary> /// Register viewmodel types with <seealso cref="DataTemplate"/> for a view /// and return all definitions with a <seealso cref="PanesTemplateSelector"/> instance. /// </summary> /// <param name="paneSel"></param> /// <returns></returns> private PanesTemplateSelector RegisterDataTemplates(PanesTemplateSelector paneSel) { // Register Log4Net DataTemplates var template = ResourceLocator.GetResource <DataTemplate>( Assembly.GetAssembly(typeof(OutputTWViewModel)).GetName().Name, "DataTemplates/OutputViewDataTemplate.xaml", "OutputViewDataTemplate") as DataTemplate; paneSel.RegisterDataTemplate(typeof(OutputTWViewModel), template); return(paneSel); }