public void OnExecute(object sender, EventArgs e) { if (_threadFixPlugin.Markers != null) { var toolWindow = (ToolWindowControl)_threadFixPlugin.ToolWindow.Content; toolWindow.SetViewModel(_viewModelService.GetVulnerabilityViewModel(_threadFixPlugin.Markers)); } var windowFrame = (IVsWindowFrame)_threadFixPlugin.ToolWindow.Frame; Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(windowFrame.Show()); }