Ejemplo n.º 1
0
            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);
                }
            }
Ejemplo n.º 2
0
 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);
     }
 }