Add Collapse to Definitions button to Visual Studio
Click on the menu bar to display the “Add or Remove Buttons.” Click “Customize” on the pop-up menu. Click “Add Command.” Select “Edit” on the Categories select list on the left. Scroll down to “Outline Collapse To Definitions.” Select it and click “OK.”