Expand and Collapse

  • Thread starter Thread starter Jenny
  • Start date Start date
J

Jenny

My codebehind file contains a lot of sub's.
Is there a fast way to expand and collapse them in the
VisualStudio? It's really exhausting to collapse them all
after opening the project in the morning!


Thanks
Jenny
 
Hi Jenny,

In the codebehind file

In the Outlining submenu of the Edit menu and in the
context menu, the following commands are available for
all languages:

1.Hide Selection - Hides the currently selected text.
Text must be selected to execute this command. Shortcut
keys are CTRL+M and then CTRL+H. (This command is
available in Visual C# .NET only when auto-outlining is
turned off or Stop Outlining is selected.)
2.Toggle Outlining Expansion - Reverses the current
hidden or expanded state of the innermost outlining
section in which the cursor lies when you are in a nested
collapsed section. Shortcut keys are CTRL+M and then
CTRL+M.
3.Toggle All Outlining - Sets all procedures to the same
hidden or expanded state. If some regions are expanded
and some hidden, then the hidden regions are expanded.
Shortcut keys are CTRL+M and then CTRL+L.
4.Stop Outlining - Removes all outlining information for
the entire document. All procedures are visible and the
symbols removed, but the underlying code is undisturbed.
Shortcut keys are CTRL+M and then CTRL+P.
5.Stop Hiding Current - Removes the outlining information
for the currently selected user-defined region. Shortcut
keys are CTRL+M and then CTRL+U. (This command is
available in Visual C# .NET only when auto-outlining is
turned off or Stop Outlining is selected.)
6.Collapse to Definitions - Collapses the members of all
types so that all of the members belonging to a type are
clearly seen. Identical to the Collapse Block command
except that the environment automatically runs through
all of the code in the document, creates regions in each
of your procedures, and then hides them. Shortcut keys
are CTRL+M and then CTRL+O.


HTH
Ravikanth[MVP]

Ravikanth[MVP]
 
Back
Top