Solution Explorer

  • Thread starter Thread starter Nice Chap
  • Start date Start date
N

Nice Chap

Is there is a shortcut key/menu item to collapse all the project folders in
the solution explorer.
 
Is there is a shortcut key/menu item to collapse all the project folders in
the solution explorer.

On a tree view, the left arrow key collapses and the right arrow key opens.
Perhaps this will help you?
 
Hi

You can do it with macros..

1) Open Tools->Macros->Macros ID
2) Right-Click 'MyMacros' and add a new module named 'SolutionExplorerMacros
3) Paste the following code into the body of the macro:

\\
Public Sub CollapseAllSolutionProjects(
Dim objUIHierarchyItem As UIHierarchyIte
Dim objUIHierarchySubItem As UIHierarchyIte

For Each objUIHierarchyItem In CType(DTE.Windows.Item("{3AE79031-E1BC-11D0-8F78-00A0C9110057}").Object, UIHierarchy).UIHierarchyItem
For Each objUIHierarchySubItem In objUIHierarchyItem.UIHierarchyItem
With objUIHierarchySubItem.UIHierarchyItem
If (.Count > 0) The
.Expanded = Fals
End I
End Wit
Nex
Nex
End Su

Public Sub ExpandAllSolutionProjects(
Dim objUIHierarchyItem As UIHierarchyIte
Dim objUIHierarchySubItem As UIHierarchyIte

For Each objUIHierarchyItem In CType(DTE.Windows.Item("{3AE79031-E1BC-11D0-8F78-00A0C9110057}").Object, UIHierarchy).UIHierarchyItem
For Each objUIHierarchySubItem In objUIHierarchyItem.UIHierarchyItem
With objUIHierarchySubItem.UIHierarchyItem
If (.Count > 0) The
.Expanded = Tru
End I
End Wit
Nex
Nex
End Su
//

You can then add toolbar buttons and/or menu items to the IDE for these macros and assign shortcut keys to them if you want to

HTH
Gary
 
Back
Top