There's a button to collapse all, and I use it often. Sometimes, rarely, I want to expand everything, but there's no button for that.
Click on the solution in the Solution Explorer and type * on the numeric keypad.
This also works for projects or even just folders inside a project.