Exemple #1
0
        public void ShowTutorialWindow(int tutorialId, Lifetime lifetime,
                                       ISolution solution, IPsiFiles psiFiles, ChangeManager changeManager, TextControlManager textControlManager,
                                       IShellLocks shellLocks, IEditorManager editorManager, DocumentManager documentManager,
                                       IUIApplication environment,
                                       IActionManager actionManager, WindowsHookManager windowsHookManager, IPsiServices psiServices,
                                       IActionShortcuts shortcutManager, IColorThemeManager colorThemeManager, IThreading threading)
        {
            var contentPath = _globalSettings.GetPath(tutorialId, PathType.WorkCopyContentFile);

            _runningTutorial = tutorialId;

            threading.ExecuteOrQueue("RunTutorialWindow", () =>
            {
                _tutorialWindow = new TutorialWindow(contentPath, lifetime, this, solution, psiFiles, changeManager,
                                                     textControlManager,
                                                     shellLocks, editorManager, documentManager, environment, actionManager, _toolWindowClass,
                                                     windowsHookManager, colorThemeManager);

                lifetime.AddBracket(
                    () =>
                {
                    _tutorialWindow.Show();
                    _homeWindow.HideLoadingImages();
                },
                    () =>
                {
                    _tutorialWindow.Close();
                    _tutorialWindow  = null;
                    _runningTutorial = 0;
                    _homeWindow.EnableButtons(true);
                });
            });
        }
    public TypeInterfaceToolWindowRegistrar(Lifetime lifetime,
                                    ToolWindowManager toolWindowManager,
                                    IShellLocks locks,
                                    ISettingsStore settingsStore,
                                    IActionManager actionManager,
                                    IActionBarManager actionBarManager,
                                    IShortcutManager shortcutManager,
                                    TypeInterfaceToolWindowDescriptor toolWindowDescriptor,
                                    ITheming theming,
                                    IThemedIconManager themedIconManager, IColorThemeManager colorThemeManager)
    {
      myLifetime = lifetime;
      myLocks = locks;
      mySettingsStore = settingsStore;
      myActionBarManager = actionBarManager;
      myTheming = theming;
      myThemedIconManager = themedIconManager;
      myColorThemeManager = colorThemeManager;

      myToolWindowClass = toolWindowManager.Classes[toolWindowDescriptor];
      myToolWindowClass.RegisterEmptyContent(
        lifetime,
        lt =>
          {
            var emptyLabel = new RichTextLabel { BackColor = SystemColors.Control, Dock = DockStyle.Fill };
            emptyLabel.RichTextBlock.Add(new RichText("No hierarchies open", new TextStyle(FontStyle.Bold)));
            emptyLabel.RichTextBlock.Add(
              new RichText("Use " + actionManager.GetHowToExecuteAction(shortcutManager, typeof(BrowseTypeHierarchyAction)), TextStyle.Default));
            emptyLabel.RichTextBlock.Add(new RichText("on a type to see hierarchy", TextStyle.Default));
            emptyLabel.RichTextBlock.Parameters = new RichTextBlockParameters(8, ContentAlignment.MiddleCenter);
            return emptyLabel.BindToLifetime(lt);
          });
    }
        public TypeInterfaceToolWindowRegistrar(Lifetime lifetime,
                                                ToolWindowManager toolWindowManager,
                                                IShellLocks locks,
                                                ISettingsStore settingsStore,
                                                IActionManager actionManager,
                                                IActionBarManager actionBarManager,
                                                IShortcutManager shortcutManager,
                                                TypeInterfaceToolWindowDescriptor toolWindowDescriptor,
                                                ITheming theming,
                                                IThemedIconManager themedIconManager, IColorThemeManager colorThemeManager)
        {
            myLifetime          = lifetime;
            myLocks             = locks;
            mySettingsStore     = settingsStore;
            myActionBarManager  = actionBarManager;
            myTheming           = theming;
            myThemedIconManager = themedIconManager;
            myColorThemeManager = colorThemeManager;

            myToolWindowClass = toolWindowManager.Classes[toolWindowDescriptor];
            myToolWindowClass.RegisterEmptyContent(
                lifetime,
                lt =>
            {
                var emptyLabel = new RichTextLabel {
                    BackColor = SystemColors.Control, Dock = DockStyle.Fill
                };
                emptyLabel.RichTextBlock.Add(new RichText("No hierarchies open", new TextStyle(FontStyle.Bold)));
                emptyLabel.RichTextBlock.Add(
                    new RichText("Use " + actionManager.GetHowToExecuteAction(shortcutManager, typeof(BrowseTypeHierarchyAction)), TextStyle.Default));
                emptyLabel.RichTextBlock.Add(new RichText("on a type to see hierarchy", TextStyle.Default));
                emptyLabel.RichTextBlock.Parameters = new RichTextBlockParameters(8, ContentAlignment.MiddleCenter);
                return(emptyLabel.BindToLifetime(lt));
            });
        }
Exemple #4
0
        public TutorialRunner([NotNull] Lifetime lifetime, ISolution solution, IPsiFiles psiFiles,
                              [NotNull] ISolutionStateTracker solutionStateTracker,
                              [NotNull] GlobalSettings globalSettings, TextControlManager textControlManager, IShellLocks shellLocks,
                              IEditorManager editorManager, DocumentManager documentManager, IUIApplication environment,
                              IActionManager actionManager, ToolWindowManager toolWindowManager, TutorialWindowDescriptor tutorialWindowDescriptor,
                              IWindowsHookManager windowsHookManager, IPsiServices psiServices, IActionShortcuts shortcutManager,
                              IColorThemeManager colorThemeManager)
        {
            if (lifetime == null)
            {
                throw new ArgumentNullException("lifetime");
            }
            if (solutionStateTracker == null)
            {
                throw new ArgumentNullException("solutionStateTracker");
            }
            if (globalSettings == null)
            {
                throw new ArgumentNullException("globalSettings");
            }


            foreach (var tutorial in globalSettings.AvailableTutorials)
            {
                if (VsCommunication.GetCurrentSolutionPath() == tutorial.Value)
                {
                    solutionStateTracker.AfterPsiLoaded.Advise(lifetime,
                                                               sol => RunTutorial(globalSettings.GetPath(tutorial.Key, PathType.WorkCopyContentFile), lifetime, solution, psiFiles,
                                                                                  textControlManager, shellLocks, editorManager, documentManager, environment, actionManager, toolWindowManager,
                                                                                  tutorialWindowDescriptor, windowsHookManager, psiServices, shortcutManager, colorThemeManager));
                }
            }
        }
Exemple #5
0
        public TutorialWindowRunner([NotNull] Lifetime lifetime, ISolution solution, IPsiFiles psiFiles,
                                    ChangeManager changeManager, [NotNull] ISolutionStateTracker solutionStateTracker,
                                    [NotNull] GlobalSettings globalSettings, TextControlManager textControlManager, IShellLocks shellLocks,
                                    IEditorManager editorManager, DocumentManager documentManager, IUIApplication environment,
                                    IActionManager actionManager,
                                    WindowsHookManager windowsHookManager, IPsiServices psiServices, IActionShortcuts shortcutManager,
                                    IColorThemeManager colorThemeManager, IThreading threading)
        {
            if (lifetime == null)
            {
                throw new ArgumentNullException("lifetime");
            }
            if (solutionStateTracker == null)
            {
                throw new ArgumentNullException("solutionStateTracker");
            }
            if (globalSettings == null)
            {
                throw new ArgumentNullException("globalSettings");
            }


            foreach (var tutorial in globalSettings.AvailableTutorials)
            {
                if (VsIntegration.GetCurrentSolutionPath() == tutorial.Value)
                {
                    solutionStateTracker.AfterSolutionOpened.Advise(lifetime,
                                                                    () =>
                                                                    RunTutorial(globalSettings, tutorial.Key, lifetime, solution, psiFiles, changeManager,
                                                                                textControlManager, shellLocks, editorManager, documentManager, environment,
                                                                                actionManager, windowsHookManager, psiServices, shortcutManager, colorThemeManager,
                                                                                threading));
                }
            }
        }
Exemple #6
0
        public HomeWindow(Lifetime lifetime, TutorialWindowManager windowManager,
                          IShellLocks shellLocks, IUIApplication environment, IActionManager actionManager,
                          TabbedToolWindowClass toolWindowClass, IWindowsHookManager windowsHookManager,
                          IColorThemeManager colorThemeManager)
        {
            _windowManager     = windowManager;
            _lifetime          = lifetime;
            _shellLocks        = shellLocks;
            _colorThemeManager = colorThemeManager;
            _toolWindowClass   = toolWindowClass;
            _htmlGenerator     = new HtmlGenerator(lifetime, colorThemeManager);

            var toolWindowInstance = _toolWindowClass.RegisterInstance(
                lifetime, null, null,
                (lt, twi) =>
            {
                twi.QueryClose.Value = true;

                var containerControl = new TutorialPanel(environment).BindToLifetime(lt);

                var viewControl = new HtmlViewControl(windowsHookManager, actionManager)
                {
                    Dock = DockStyle.Fill,
                    WebBrowserShortcutsEnabled = false,
                }.BindToLifetime(lt);

                var webControlHandler = new WebBrowserHostUiHandler(viewControl)
                {
                    Flags = HostUIFlags.DPI_AWARE,
                    IsWebBrowserContextMenuEnabled = false
                };

                lt.AddBracket(
                    () => _containerControl = containerControl,
                    () => _containerControl = null);

                lt.AddBracket(
                    () => _viewControl = viewControl,
                    () => _viewControl = null);

                lt.AddBracket(
                    () => _containerControl.Controls.Add(_viewControl),
                    () => _containerControl.Controls.Remove(_viewControl));

                _htmlMediator = new HtmlMediator(lifetime, this);

                _colorThemeManager.ColorThemeChanged.Advise(lifetime, RefreshKeepContent);

                SetColors();

                return(new EitherControl(lt, containerControl));
            });

            toolWindowInstance.Title.Value = "Home";
        }
Exemple #7
0
        private static void RunTutorial(string contentPath, Lifetime lifetime, ISolution solution, IPsiFiles psiFiles,
                                        TextControlManager textControlManager, IShellLocks shellLocks, IEditorManager editorManager,
                                        DocumentManager documentManager, IUIApplication environment, IActionManager actionManager,
                                        ToolWindowManager toolWindowManager, TutorialWindowDescriptor tutorialWindowDescriptor,
                                        IWindowsHookManager windowsHookManager, IPsiServices psiServices, IActionShortcuts shortcutManager,
                                        IColorThemeManager colorThemeManager)
        {
            var tutorialWindow = new TutorialWindow(contentPath, lifetime, solution, psiFiles, textControlManager, shellLocks, editorManager,
                                                    documentManager, environment, actionManager, toolWindowManager, tutorialWindowDescriptor, windowsHookManager,
                                                    psiServices, shortcutManager, colorThemeManager);

            lifetime.AddBracket(
                () => { tutorialWindow.Show(); },
                () => { tutorialWindow.Close(); });
        }
Exemple #8
0
        public TutorialWindowManager(Lifetime shellLifetime, SolutionStateTracker solutionStateTracker,
                                     GlobalSettings globalSettings,
                                     IShellLocks shellLocks, ToolWindowManager toolWindowManager, TutorialWindowDescriptor toolWindowDescriptor,
                                     IUIApplication environment, IActionManager actionManager, IWindowsHookManager windowsHookManager,
                                     IColorThemeManager colorThemeManager, IThreading threading)
        {
            _shellLifetime        = shellLifetime;
            _solutionStateTracker = solutionStateTracker;
            _globalSettings       = globalSettings;
            _shellLocks           = shellLocks;
            _environment          = environment;
            _actionManager        = actionManager;
            _windowsHookManager   = windowsHookManager;
            _colorThemeManager    = colorThemeManager;
            _threading            = threading;

            _runningTutorial = 0;

            _toolWindowClass = toolWindowManager.Classes[toolWindowDescriptor] as TabbedToolWindowClass;
            if (_toolWindowClass == null)
            {
                throw new ApplicationException("Expected tabbed tool window");
            }

            _toolWindowClass.QueryCloseInstances.Advise(shellLifetime, args =>
            {
                if (_runningTutorial == 0)
                {
                    return;
                }
                if (!_tutorialWindow.IsLastStep)
                {
                    args.Cancel = !MessageBox.ShowYesNo(
                        "This will close the tutorial solution as well. Tutorial progress will be lost. Close the tutorial?",
                        "ReSharper Tutorials");
                    if (args.Cancel)
                    {
                        return;
                    }
                }
                VsIntegration.CloseVsSolution(true);
            });
        }
Exemple #9
0
        private static void RunTutorial(GlobalSettings globalSettings, int tutorialId, Lifetime lifetime,
                                        ISolution solution,
                                        IPsiFiles psiFiles, ChangeManager changeManager, TextControlManager textControlManager,
                                        IShellLocks shellLocks,
                                        IEditorManager editorManager, DocumentManager documentManager, IUIApplication environment,
                                        IActionManager actionManager,
                                        WindowsHookManager windowsHookManager, IPsiServices psiServices, IActionShortcuts shortcutManager,
                                        IColorThemeManager colorThemeManager, IThreading threading)
        {
            if (globalSettings.TutorialWindowManager == null)
            {
                throw new ApplicationException("Expected globalSettings.TutorialWindowManager");
            }

            globalSettings.TutorialWindowManager.ShowTutorialWindow(tutorialId, lifetime, solution, psiFiles,
                                                                    changeManager,
                                                                    textControlManager, shellLocks, editorManager, documentManager, environment, actionManager,
                                                                    windowsHookManager, psiServices, shortcutManager, colorThemeManager, threading);
        }
Exemple #10
0
        public UiThemeViewModel(Lifetime lifetime, IColorThemeManager colorThemeManager)
        {
            BackgroundColor = new Property <SolidColorBrush>(lifetime, "UiThemeViewModel.BackgroundColor")
            {
                Value = new SolidColorBrush()
            };
            TextColor = new Property <SolidColorBrush>(lifetime, "UiThemeViewModel.TextColor")
            {
                Value = new SolidColorBrush()
            };

            var bgColor = colorThemeManager.CreateLiveColor(lifetime, ThemeColor.ToolWindowBackground);

            bgColor.ForEachValue(lifetime, (lt, color) => { BackgroundColor.Value.Color = color.WpfColor; });

            var txtColor = colorThemeManager.CreateLiveColor(lifetime, ThemeColor.ToolWindowForeground);

            txtColor.ForEachValue(lifetime, (lt, color) => { TextColor.Value.Color = color.WpfColor; });
        }
Exemple #11
0
        public TutorialWindow(string contentPath, Lifetime tutorialLifetime, TutorialWindowManager windowManager,
                              ISolution solution, IPsiFiles psiFiles,
                              ChangeManager changeManager, TextControlManager textControlManager, IShellLocks shellLocks,
                              IEditorManager editorManager,
                              DocumentManager documentManager, IUIApplication environment, IActionManager actionManager,
                              TabbedToolWindowClass toolWindowClass,
                              WindowsHookManager windowsHookManager,
                              IColorThemeManager colorThemeManager)
        {
            _windowManager     = windowManager;
            _htmlGenerator     = new HtmlGenerator(tutorialLifetime, colorThemeManager);
            _tutorialLifetime  = tutorialLifetime;
            _shellLocks        = shellLocks;
            _colorThemeManager = colorThemeManager;

            if (!solution.GetComponent <ISolutionOwner>().IsRealSolutionOwner)
            {
                return;
            }

            _toolWindowInstance = toolWindowClass.RegisterInstance(
                tutorialLifetime, null, null,
                (lt, twi) =>
            {
                twi.QueryClose.Value = true;

                var containerControl = new TutorialPanel(environment).BindToLifetime(lt);

                var viewControl = new HtmlViewControl(windowsHookManager, actionManager)
                {
                    Dock = DockStyle.Fill,
                    WebBrowserShortcutsEnabled = false
                }.BindToLifetime(lt);

                var webControlHandler = new WebBrowserHostUiHandler(viewControl)
                {
                    Flags = HostUIFlags.DPI_AWARE,
                    IsWebBrowserContextMenuEnabled = false
                };

                lt.AddBracket(
                    () => _containerControl = containerControl,
                    () => _containerControl = null);

                lt.AddAction(() => _progressBar = null);

                lt.AddBracket(
                    () => _viewControl = viewControl,
                    () => _viewControl = null);

                lt.AddBracket(
                    () =>
                {
                    _containerControl.Controls.Add(_viewControl);
                    _containerControl.Controls.Add(_progressBar);
                },
                    () =>
                {
                    _containerControl.Controls.Remove(_viewControl);
                    _containerControl.Controls.Remove(_progressBar);
                });

                _colorThemeManager.ColorThemeChanged.Advise(tutorialLifetime, RefreshKeepContent);

                SetColors();

                _htmlMediator = new HtmlMediator(tutorialLifetime, this);
                _htmlMediator.OnNextStepButtonClick.Advise(tutorialLifetime,
                                                           () => NextStep?.Invoke(null, EventArgs.Empty));
                _htmlMediator.OnRunStepNavigationLinkClick.Advise(tutorialLifetime, NavigateToCodeByLink);

                var focusTracker = new WindowFocusTracker(tutorialLifetime);
                focusTracker.IsFocusOnEditor.Change.Advise(tutorialLifetime,
                                                           () => _htmlMediator.ChangeNextStepButtonText(focusTracker.IsFocusOnEditor.Value));

                _htmlMediator.OnPageHasFullyLoaded.Advise(tutorialLifetime,
                                                          () => { _htmlMediator.ChangeNextStepButtonText(focusTracker.IsFocusOnEditor.Value); });

                return(new EitherControl(lt, containerControl));
            });

            _stepPresenter = new TutorialStepPresenter(this, contentPath, tutorialLifetime, solution, psiFiles,
                                                       changeManager,
                                                       textControlManager, shellLocks, editorManager, documentManager, environment, actionManager);

            _toolWindowInstance.Title.Value = _stepPresenter.Title;
        }
Exemple #12
0
        public HtmlGenerator(Lifetime lifetime, IColorThemeManager colorThemeManager)
        {
            var isDarkTheme = colorThemeManager.IsDarkTheme(lifetime);

            isDarkTheme.Change.Advise_HasNew(lifetime, args => ApplyColorTheme(args.New ? UiColorTheme.Dark : UiColorTheme.Light));
        }
Exemple #13
0
        public TutorialWindow(string contentPath, Lifetime lifetime, ISolution solution, IPsiFiles psiFiles,
                              TextControlManager textControlManager, IShellLocks shellLocks, IEditorManager editorManager,
                              DocumentManager documentManager, IUIApplication environment, IActionManager actionManager,
                              ToolWindowManager toolWindowManager, TutorialWindowDescriptor toolWindowDescriptor,
                              IWindowsHookManager windowsHookManager, IPsiServices psiServices, IActionShortcuts shortcutManager,
                              IColorThemeManager colorThemeManager)
        {
            _lifetime          = lifetime;
            _solution          = solution;
            _actionManager     = actionManager;
            _shellLocks        = shellLocks;
            _psiServices       = psiServices;
            _shortcutManager   = shortcutManager;
            _colorThemeManager = colorThemeManager;
            _toolWindowClass   = toolWindowManager.Classes[toolWindowDescriptor];

            if (solution.GetComponent <ISolutionOwner>().IsRealSolutionOwner)
            {
                var toolWindowInstance = _toolWindowClass.RegisterInstance(
                    lifetime, null, null,
                    (lt, twi) =>
                {
                    var containerControl = new TutorialPanel(environment).BindToLifetime(lt);

                    var viewControl = new HtmlViewControl(windowsHookManager, actionManager)
                    {
                        Dock = DockStyle.Fill,
                    }.BindToLifetime(lt);

                    var buttonNext = new Button
                    {
                        Text           = "Next",
                        Anchor         = AnchorStyles.Bottom | AnchorStyles.Right,
                        FlatStyle      = FlatStyle.Flat,
                        FlatAppearance = { BorderColor = Color.Gray, BorderSize = 1 }
                    };

                    lt.AddBracket(
                        () => _buttonNext = buttonNext,
                        () => _buttonNext = null);

                    _buttonNext.Top  = containerControl.Height - _buttonNext.Height - 10;
                    _buttonNext.Left = containerControl.Width - _buttonNext.Width - 25;

                    lt.AddBracket(
                        () => _containerControl = containerControl,
                        () => _containerControl = null);

                    lt.AddBracket(
                        () => _viewControl = viewControl,
                        () => _viewControl = null);

                    lt.AddBracket(
                        () => { _buttonNext.Click += NextStep; },
                        () => { _buttonNext.Click -= NextStep; });

                    lt.AddBracket(
                        () => _containerControl.Controls.Add(_buttonNext),
                        () => _containerControl.Controls.Remove(_buttonNext));

                    lt.AddBracket(
                        () => _containerControl.Controls.Add(_viewControl),
                        () => _containerControl.Controls.Remove(_viewControl));

                    _colorThemeManager.ColorThemeChanged.Advise(lifetime, RefreshKeepContent);

                    SetColors();

                    return(new EitherControl(lt, containerControl));
                });

                _toolWindowClass.QueryCloseInstances.Advise(_lifetime, args => { Close(); });    // not working

                _stepPresenter = new TutorialStepPresenter(this, contentPath, lifetime, solution, psiFiles, textControlManager,
                                                           shellLocks, editorManager, documentManager, environment, actionManager, psiServices, shortcutManager);
            }
        }
Exemple #14
0
        public SampleToolWindow(Lifetime lifetime, ToolWindowManager toolWindowManager,
                                SampleToolWindowDescriptor sampleToolWindowDescriptor, ISettingsStore settingsStore,
                                IColorThemeManager colorThemeManager)
        {
            _toolWindowClass = toolWindowManager.Classes[sampleToolWindowDescriptor] as TabbedToolWindowClass;
            if (_toolWindowClass == null)
            {
                throw new ApplicationException("ToolWindowClass");
            }

            _toolWindowInstance = _toolWindowClass.RegisterInstance(lifetime, "Sample Tool Window", null,
                                                                    (lt, twi) =>
            {
                twi.QueryClose.Value = true;

                var toolPanel = new ToolPanel();

                // Tool Window
                var toolwndView    = new ToolWindowView();
                var toolwndViewTab = new TabItem
                {
                    Content = toolwndView,
                    Header  = toolwndView.Name
                };
                toolPanel.tabControl.Items.Add(toolwndViewTab);

                // Options
                var optionsPageViewModel = new OptionsPageViewModel(lt, settingsStore);
                var optionsPageView      = new OptionsPageView {
                    DataContext = optionsPageViewModel
                };
                var optionsPageViewTab = new TabItem
                {
                    Content = optionsPageView,
                    Header  = optionsPageView.Name
                };
                toolPanel.tabControl.Items.Add(optionsPageViewTab);

                // Actions
                var actionsViewModel = new ActionsViewModel(lt);
                var actionsView      = new ActionsView {
                    DataContext = actionsViewModel
                };
                var actionsViewTab = new TabItem
                {
                    Content = actionsView,
                    Header  = actionsView.Name
                };
                toolPanel.tabControl.Items.Add(actionsViewTab);

                // PSI Navigation
                var psiNavigationViewModel = new PsiNavigationViewModel(lt);
                var psiNavigationView      = new PsiNavigationView {
                    DataContext = psiNavigationViewModel
                };
                var psiNavigationViewTab = new TabItem
                {
                    Content = psiNavigationView,
                    Header  = psiNavigationView.Name
                };
                toolPanel.tabControl.Items.Add(psiNavigationViewTab);

                // Context Action
                var contextActionView    = new ToLowerCaseContextActionView();
                var contextActionViewTab = new TabItem
                {
                    Content = contextActionView,
                    Header  = contextActionView.Name
                };
                toolPanel.tabControl.Items.Add(contextActionViewTab);

                // Quick Fix
                var quickFixView    = new CorrectBadWordQuickFixView();
                var quickFixViewTab = new TabItem
                {
                    Content = quickFixView,
                    Header  = quickFixView.Name
                };
                toolPanel.tabControl.Items.Add(quickFixViewTab);

                // Element Problem Analyzer and Code Highlighting
                var problemAnalyzerView    = new BadWordNamingView();
                var problemAnalyzerViewTab = new TabItem
                {
                    Content = problemAnalyzerView,
                    Header  = problemAnalyzerView.Name
                };
                toolPanel.tabControl.Items.Add(problemAnalyzerViewTab);

                // Solution Component
                var solcompView    = new SolutionComponentView();
                var solcompViewTab = new TabItem
                {
                    Content = solcompView,
                    Header  = solcompView.Name
                };
                toolPanel.tabControl.Items.Add(solcompViewTab);

                // Signals
                var sigViewModel = new SignalsViewModel(lt);
                var sigView      = new SignalsView {
                    DataContext = sigViewModel
                };
                var sigViewTab = new TabItem
                {
                    Content = sigView,
                    Header  = sigView.Name
                };
                toolPanel.tabControl.Items.Add(sigViewTab);

                // IProperty
                var propViewModel = new PropertyViewModel(lt);
                var propView      = new PropertyView {
                    DataContext = propViewModel
                };
                var propViewTab = new TabItem
                {
                    Content = propView,
                    Header  = propView.Name
                };
                toolPanel.tabControl.Items.Add(propViewTab);

                // UI Themes
                var uithemeViewModel = new UiThemeViewModel(lt, colorThemeManager);
                var uithemeView      = new UiThemeView {
                    DataContext = uithemeViewModel
                };
                var uithemeViewTab = new TabItem
                {
                    Content = uithemeView,
                    Header  = uithemeView.Name
                };
                toolPanel.tabControl.Items.Add(uithemeViewTab);

                return(new EitherControl(lt, toolPanel));
            });
        }