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.
Syncfusion Feedback

NodeMoved Event

Thread ID:

Created:

Updated:

Platform:

Replies:

39131 Dec 28,2005 01:40 PM UTC Dec 29,2005 01:59 AM UTC Windows Forms 2
loading
Tags: Diagram
Denny Huang
Asked On December 28, 2005 01:40 PM UTC

Hi, I have a application which determines whether a node on diagram can be drag from position "A" to position "B". If it cannot be moved to "B", it will be repositioned to "A". I do the check and repositioning in NodeMoved event handler. However, NodeMoved event recursively happened and causes stack overflow exception. Is there any way to stop NodeMoved event after reposition nodes? Denny

Administrator [Syncfusion]
Replied On December 28, 2005 08:42 PM UTC

Hi Denny, The Essential Diagram Model class has an EventsEnabled property that you can set to temporarily disable diagram events from being propagated. Please see if disabling this property from within your NodeMoved event handler just before applying the new bounds and re-enabling it after setting it helps avoid the recursion. Thanks, Prakash Surendra Syncfusion Inc.,

Denny Huang
Replied On December 29, 2005 01:59 AM UTC

Hi Surendra, Thank you! set EventsEnabled property works fine. FYI: another way to get the same result: unhook the handler before applying the new bounds and hook it back after setting it. Thanks, Denny >Hi Denny, > >The Essential Diagram Model class has an EventsEnabled property that you can set to temporarily disable diagram events from being propagated. Please see if disabling this property from within your NodeMoved event handler just before applying the new bounds and re-enabling it after setting it helps avoid the recursion. > >Thanks, >Prakash Surendra >Syncfusion Inc.,

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.

Warning Icon 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.Close Icon

;