Toggle Regions Extension for Visual Studio 2019
Quickly collapse or expand all region sections in a code editor tab.
Recognized regions:
#region
- .cs files
<!--#region
- .xaml files (#
and whitespace are optional)
#pragma region
- .cpp files
Configurable Commands
The following commands are added to the Outlining menu and can be assigned custom shortcuts:
- Expand all regions
- Command:
RegionManagement.Expand
- Default shortcut: CTRL+R, CTRL+Num +
- Collapse all regions
- Command:
RegionManagement.Collapse
- Default shortcut: CTRL+R, CTRL+Num -
- Toggle all regions - expand collapsed regions and collapse expanded regions
- Command:
RegionManagement.Toggle
- Default shortcut: CTRL+R, CTRL+Num *
- Alternate all regions - expands all regions if any region is collapsed, otherwise collapses all regions
- Command:
RegionManagement.Alternate
- Default shortcut: CTRL+R, CTRL+Num /
Remap keyboard shortcuts in Tools > Options > Environment > Keyboard (filter by RegionManagement
).