After upgrading to 4.0 it appears that this code:
won't work if a region block definition starts at the first character of the document.
protected override void OnDocumentAutomaticOutliningComplete(ActiproSoftware.SyntaxEditor.Document document, DocumentModificationEventArgs e)
{
if (e.IsProgrammaticTextReplacement)
{
document.Outlining.RootNode.CollapseDescendants("RegionBlock");
}
}
------------------------------- Marianne