We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Nodes list

Thread ID:

Created:

Updated:

Platform:

Replies:

67811 Aug 30,2007 12:07 PM Aug 30,2007 08:57 PM Windows Forms 1
loading
Tags: Diagram
Elia Chkayra
Asked On August 30, 2007 12:07 PM

hello again,
I have drawed the diagram,
now i have to get all the nodes present in it so i can write a for loop that tests if a selected node when droped on any other node in the diagram. if the selected node intersets with that node, an event should be raised. I want to do this on nodes that are created by the users.
i used the sample u provide me for the intersection but it didn't work.
thanks a lot for you help
Sincerly
Elia CHKAYRA

J.Nagarajan [Syncfusion]
Replied On August 30, 2007 08:57 PM

Hi Elia,

Thanks for your continued interest in Syncfusion product.

If your intention is to fire an event when you moved a node on another node in diagram model then you can write your own delegate. Please refer to the following code snippet

public delegate void NodeDragDrop(object sender, PinPointChangedEventArgs evtargs);
public event NodeDragDrop nodedragdrop;

public MainForm()
{
this.nodedragdrop += new NodeDragDrop(MainForm_nodedragdrop);
this.diagram1.Model.EventSink.PinPointChanged += new PinPointChangedEventHandler(EventSink_PinPointChanged);
}

void EventSink_PinPointChanged(PinPointChangedEventArgs evtArgs)
{
Node objNode = evtArgs.NodeAffected as Node;
foreach (INode m_node in this.diagram1.Model.Nodes)
{
Node node = m_node as Node;
if(objNode != node && objNode.BoundingRectangle.IntersectsWith(node.BoundingRectangle))
{
this.nodedragdrop(this, evtArgs);
}
}

}

I have attahced the sample that demonstrates this completely. You can download the sample from the following page.

http://websamples.syncfusion.com/samples/Diagram.Windows/F67796/main.htm

Please refer to the sample and let me know if you ahve any questions.

Regards,
Nagaraj

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;