private void HidePalettes() { List <ViewElement> list = Enumerable.ToList <ViewElement>(this.HideableViews); if (!Enumerable.Any <ViewElement>((IEnumerable <ViewElement>)list)) { return; } PerformanceUtility.MeasurePerformanceUntilRender(PerformanceEvent.TogglePalettes); Microsoft.VisualStudio.PlatformUI.Shell.View activeView = ViewManager.Instance.ActiveView; if (list.Contains((ViewElement)activeView)) { this.SavedActiveView = activeView; } foreach (ViewElement viewElement in list) { ExpressionView expressionView = viewElement as ExpressionView; if (expressionView != null) { expressionView.WasSelectedBeforeAutoHide = expressionView.IsSelected; } } foreach (ViewElement viewElement in list) { DockOperations.AutoHide(viewElement); } }
protected virtual void OnAutoHideViewCore(ViewElement autoHidingElement, bool autoHideOnlyActiveView) { if (autoHidingElement.Parent is AutoHideGroup) { DockOperations.DockViewElementOrGroup(autoHidingElement, autoHideOnlyActiveView); } else { if (autoHideOnlyActiveView) { TabGroup tabGroup = autoHidingElement as TabGroup; if (tabGroup != null) { autoHidingElement = tabGroup.SelectedElement; } } DockOperations.AutoHide(autoHidingElement); } }