diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs index 7ed119abd..ca8d7066c 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs @@ -38,10 +38,14 @@ namespace Tango.MachineStudio.UI.Views { private DefaultStudioModuleLoader _loader; + public static MainView Instance { get; set; } + public MainView() : base() { InitializeComponent(); + Instance = this; + _loader = TangoIOC.Default.GetInstance<IStudioModuleLoader>() as DefaultStudioModuleLoader; _loader.ModulesLoaded += Loader_ModulesLoaded; } @@ -69,11 +73,11 @@ namespace Tango.MachineStudio.UI.Views ThreadsHelper.InvokeUI(() => { - if (!TransitionControl.Elements.ToList().Exists(x => x.GetType() == module.MainViewType)) + if (!NavigationControl.Elements.ToList().Exists(x => x.GetType() == module.MainViewType)) { FrameworkElement view = Activator.CreateInstance(module.MainViewType) as FrameworkElement; NavigationControl.SetNavigationName(view, module.Name); - TransitionControl.Elements.Add(view); + NavigationControl.Elements.Add(view); } _loader.UserModules.Add(module); |
