Back to Devexpress

Expand/Collapse Regions

coderushforroslyn-119944-coding-assistance-typing-helpers-expand-collapse-regions.md

latest903 B
Original Source

Expand/Collapse Regions

  • Oct 27, 2021

You can use the Space keyboard shortcut to expand and collapse a code region.

  1. Place the caret at the start of the #region or #endregion directive.

  2. Press the Space key.

CodeRush also allows you to expand/collapse a region when the caret is at the beginning of the code line that contains the #region directive.

To enable this functionality, do the following actions:

  1. Choose CodeRush | Shortcuts… from Visual Studio’s menu to open the Shortcuts configuration page.

  2. Find the Space shortcut with the [OnOutliningStartLine]&&[AtBeginningOfLine] context and enable the Enabled check box.

  3. Click OK to close the Shortcuts page and save the changes.