Hi,
It is unclear from your question what are you trying to do. If you want to expand/collapse a toggle decorator (i.e. an expand/collapse decorator or a show/hide subtree decorator), you should call its ToggleState method.
If you want to subscribe to the click event of the decorator, you should use the NodeClick event of the drawing document's Event Sink service. Here's some sample code:
document.EventSinkService.NodeClick += OnNodeClick;
...
private void OnNodeClick(NNodeViewEventArgs args)
{
NShowHideSubtreeDecorator decorator = args.Node as NShowHideSubtreeDecorator;
if (decorator != null)
{
// Your code here
args.Handled = true;
}
}
Best Regards,
Nevron Support Team