public void CreateConsole(IWpfConsoleService consoleService) { _consoleService = consoleService; _console = _consoleService.CreateConsole(ServiceLocator.PackageServiceProvider, DebugConsoleToolWindow.ContentType, "nugetdebug"); _console.StartWritingOutput(); IVsTextView view = _console.VsTextView as IVsTextView; var adapterFactory = ServiceLocator.GetInstance <IVsEditorAdaptersFactoryService>(); IWpfTextView wpfView = adapterFactory.GetWpfTextView(view); // adjust the view options if (wpfView != null) { wpfView.Options.SetOptionValue(DefaultTextViewOptions.WordWrapStyleId, WordWrapStyles.None); Brush blackBg = Brushes.Black; blackBg.Freeze(); wpfView.Background = blackBg; } UIElement element = _console.Content as UIElement; _debugWindow.DebugGrid.Children.Add(element); // Add message sources AttachEvents(); }
public void CreateConsole(IWpfConsoleService consoleService) { _consoleService = consoleService; _console = _consoleService.CreateConsole(ServiceLocator.PackageServiceProvider, DebugConsoleToolWindow.ContentType, "nugetdebug"); _console.StartWritingOutput(); IVsTextView view = _console.VsTextView as IVsTextView; var adapterFactory = ServiceLocator.GetInstance<IVsEditorAdaptersFactoryService>(); IWpfTextView wpfView = adapterFactory.GetWpfTextView(view); // adjust the view options if (wpfView != null) { wpfView.Options.SetOptionValue(DefaultTextViewOptions.WordWrapStyleId, WordWrapStyles.None); Brush blackBg = Brushes.Black; blackBg.Freeze(); wpfView.Background = blackBg; } UIElement element = _console.Content as UIElement; _debugWindow.DebugGrid.Children.Add(element); // Add message sources AttachEvents(); }