Posted 9 years ago by Eric Yanofsky
Version: 15.1.0620
Avatar

So I have a nice SyntaxEditor window open and I populate it with some c# code.  I wanted to be able to use a shortcut or otherwise programmatically collapse all #region sections.

So I would have something like the following in my Syntaxeditor....

 

#region Stuff I want out of the way

//interesting code that doesn't need to change

#endregion

 

I may have multiple regions within my code in my syntaxeditor box.  Were I in visual studio I could use a shortcut key such as CTRL+M+O to collapse and CTRL+M+L to expand. 

I noticed CTRL+L seems to remove a line.

Ideally I'd like to programmatically access the actipro window and tell it to close all regions but I can always send the shortcut in if need be.  However, the shortcut doesn't work.

 

Is there a way to collapse all #region sections?

Comments (1)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Eric,

Yes you can fully interact with the outlining model via editor.Document.OutliningManager.  There are a ton of methods on it (just like all the VS options) and you can even walk down the entire node tree and interact with specific nodes.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.