Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio: Is there a way to collapse all items of Solution Explorer?

People also ask

How do I collapse all sections in Visual Studio?

(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.

How do you collapse rows in VS code?

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.

Solution Explorer > Collapse


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.

Solution Explorer > Resharper > Collapse

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.

Options > Keyboard > ReSharper_CollapseInSolutionExplorer

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.