Is there a way to collapse all the files at once in the Solution Explorer window in Visual Studio?
Try free VSCommands 2010 Lite extension. It has this and few other free features.
In Visual Studio 2013 you can do it with right click by Solution -> Collapse All
Use the extension Collapse Solution. Usually, this feature comes with ReSharper, but I presume that you are not using ReSharper.
There are also a lot of macros out there that help you do the same. One of them is in ‘Collapse All’ in Visual Studio.
Note: There is no inbuilt way in Visual Studio to actually achieve this. And considering just how practical it is, I would have thought they would have added this kind of feature way back in Visual Studio 2005 itself. I know people have been asking for it for years. But in their infinite wisdom, Microsoft don't consider it important enough.
Of course, you can collapse any selected node by pressing '-', but I understand you are probably looking to collapse the entire tree.
In visual studio 2013, there is a button in solution explorer - Collapse All
I think this extension have requested functionality - PowerCommands for VS 2010. Also Productivity Power Tools contains solution navigator which also have this feature and much more usefull stuff for solution navigation and search.
Edited: there also a lot of examples of macro, doing this stuff.