Posted 18 years ago
by Dierk Droth
Hi,
I'm loading C# code to editor and try to collapse all regions as by tutorial:Unfortunately it does not work: all regions are still expanded.
After loading I can collapse manually though.
Please advice, thanks
Dierk
I'm loading C# code to editor and try to collapse all regions as by tutorial:
protected override void OnDocumentTextChanged(Document document, DocumentModificationEventArgs e) {
// If programmatically setting the text of a document...
if (e.Modification.HasFlag(DocumentModificationFlags.ProgrammaticTextParse)) {
// Collapse all outlining region nodes
document.Outlining.RootNode.CollapseDescendants();
}
}
After loading I can collapse manually though.
Please advice, thanks
Dierk