One of the recently added features of SyntaxEditor for WPF is the ability to hide a region of text independently of the code outlining feature.
Here is an open-source QuickStart (included with the SyntaxEditor samples) that shows the behavior I’m describing. In this QuickStart we have an editable SyntaxEditor on top and a read-only SyntaxEditor on the bottom that binds to the text of the editable SyntaxEditor. There is also a button above both that lets us collapse (hide) selected text.

In the screenshot, I’ve selected Actipro. and will now click the Collapse Selected Text button. What this does is tag the selection’s text range using an ICollapsedRegionTag. SyntaxEditor knows to watch for that tag and when it finds an instance, its text formatting engine collapses (hides) the tagged text range.
The text that was selected is now hidden in the top SyntaxEditor. However it’s still there in the document because we can see it in the bottom SyntaxEditor. Now for the real test of whether it’s all working. Let’s type some text NeatSample. right where the caret is.
As you can see, the original selected text is still hidden in the top editor and we’ve typed some new text. The new text appears in the bottom SyntaxEditor showing that the document contains what we’d expect it to.
Summary
It’s really easy to hide text ranges with SyntaxEditor for WPF. Download the latest build to check it out.