Profile Picture

Example for NShowHideSubtree Decorator Click Event

Posted By Jaideep Tandon 10 Years Ago
Author
Message
Jaideep Tandon
Posted 10 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 5, Visits: 1
Hello All,

I am new in this tool
therefore can any one please suggest me

How to call decorator click event?


Thanks

Nevron Support
Posted 10 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 1 days ago @ 1:54 AM
Posts: 3,054, Visits: 4,009

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



Jaideep Tandon
Posted 10 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 5, Visits: 1
Hi,
I used your code But It not go to that method OnNodeClick when i click on decorator.

Currently i am using NDrawingView1_AsyncClick method to detect decorator. but this method called each time wen you click on image

But I want a method called only when i click on decorator.

Thanks



Similar Topics


Reading This Topic