Wednesday, 3 February 2010 02:43 by
Bill Henning (Actipro)
We just published WPF Studio 2009.2 build 514 and some of its new features are the culmination of over a month of work on the SyntaxEditor product. We’ve mentioned some of the new feature areas in our previous blog posts, but here is the list again:
- Collapsed text
- Intra-text spacers and intra-text adornment managers
- Code outlining
Build 514 includes 7 new samples specifically related to the features mentioned above. That brings our grand total to over 60 samples just for the SyntaxEditor product!
Our last blog post focused on a QuickStart included with build 514 that showed how to implement code reviewing right within the editor, via the use of intra-text adornments. Today I’d like to discuss code outlining.
What is code outlining?
Code outlining, also known as code folding, is the ability for an outlining node hierarchy to be constructed based on the contents of the document. The outlining node hierarchy is rendered visually within the new outlining margin as seen in the screenshot below:

A “+” or “-“ box in the margin shows where nodes start. Clicking those boxes toggles the collapsed state of the node. When a node is collapsed, its text is hidden and boxed-in collapsed text adornment is rendered in place of the hidden text. In the screenshot above, the boxed-in “/**/” is a collapsed multi-line comment node. More...