How to change Decorators for an NTreeDataSourceImporter


Author
Message
Kevin Harrison 1
Kevin Harrison 1
Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)
Group: Forum Members
Posts: 176, Visits: 1.9K
I have set CollapsibleSubtrees = true, which seems to automatically use the +/- decorators on my tree.
The question is, how do I globally change the decorator?
The examples suggest I have to iterate through every shape, and create a new decorator for each one.
Surely there must be a simple way to set the decorator for all shapes without doing this?
Where is the setting for the global +/- decorator currently being used?
Thanks
Kevin

Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.1K
Hi Kevin,

You can use styling to change some of the properties of the decorators, for example stroke, fill and so on. The decorator shape, however, is currently not styleable and that is why you should iterate through all decorators and change the shape of the decorator locally. As you have mentioned in your post, this is demonstrated in the Diagram Examples and more specifically in the example "Document Object Model -> Decorators -> Show/Hide Subtree Decorator".


foreach (NShowHideSubtreeDecorator decorator in document.Descendants(new NInstanceOfTypeFilter(typeof(NShowHideSubtreeDecorator)), -1))
{
  decorator.Background.Shape = shape;
}

document.SmartRefreshAllViews();



Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic
1 active, 1 guest, 0 members, 0 anonymous
No members currently viewing this topic!

Login

Explore
Messages
Mentions
Search