Collapsed node with more meaningful description than those 3 points

SyntaxEditor for WPF Forum

Posted 1 year ago by Daniel Constantin - ModuleWorks GmbH
Version: 19.1.0687
Avatar

Hi,

Can I put some meaningful text on a collapsed node than those 3 points inside that gray rectangle ?

Kind regards,

Daniel

Comments (1)

Answer - Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Daniel,

Yes the IOutliningNodeDefinition.GetCollapsedContent method is called to retrieve the content that should be displayed when an outlining node is collapsed.  It falls back to returning "..." if no content is returned.

Our OutliningNodeDefinition implementation of that interface's method returns its OutliningNodeDefintion.DefaultCollapsedContent property value.  It's up to your IOutliningSource-based class to create IOutliningNode objects using an IOutliningNodeDefinition that either overrides the GetCollapsedContent method or sets that DefaultCollapsedContent property.

For instance, in our VBOutliningSource, we have this:

private static OutliningNodeDefinition usingDirectiveSectionDefinition = new OutliningNodeDefinition("UsingDirectiveSection") {
 IsImplementation = true,
 DefaultCollapsedContent = "Imports ..."
};


Actipro Software Support

The latest build of this product (v22.1.3) was released 20 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.