When I open a code file in a new code window, I press Ctrl+M,O to collapse everything there. As far as I know this can be done by default, without need to press anything eve
Have you tried Tools\Options\Text Editor\C#\Advanced and check the "Enter outlining mode" when files open?