(Ctrl+M, Ctrl+P) - Removes all outlining information for the entire document. (Ctrl+M, Ctrl+U) - Removes the outlining information for the currently selected user-defined region. Not available in Visual Basic. (Ctrl+M, Ctrl+O) - Collapses the members of all types.
Ctrl + K , Ctrl + J on Windows and Linux. ⌘ + K , ⌘ + J on macOS.
It appears to be built in by default in Visual Studio 2013 onwards.
If you have ReSharper installed, you can right click on the solution in the solution explorer, and select "Collapse All".
You can use PowerCommands for Visual Studio 2008
Right click on the project\solution on the solution explorer and choose Collapse Project:
Just use the number pad's Plus + and Minus - keys at the top-level node, to expand and collapse respectively (Note: * also expands the whole list.)
For the toolbox, you need to use * and / instead for expand/collapse. Go figure.
If you have Resharper installed, there is an option called Collapse All and a shortcut key next to it.
Now this shortcut key will not work for you ! Unless you set it up using Tools > Options > Keyboard
.
The command name is ReSharper_CollapseInSolutionExplorer
.
Search using this command name and assign a shortcut key of your choice.
and you now have a shortcut key ready to use to collapse all items in your solution explorer.
I know I am a little late to this discussion, but this surely gonna help some one or other.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With