Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to cotrol points when modifying a link? (Read 1173 times)
CanadaProgrammer
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 113
Joined: Jun 30th, 2011
How to cotrol points when modifying a link?
Dec 12th, 2012 at 11:23pm
Print Post  
I try to modify values of points of a link when user
is modifying a link (I mean in LinkModifying event).
The problem is that LinkModifying is not always raised
when the link is not on any DiagramNode shape. Of course
I set AllowUnconnectedLink to false. So how to control
it in this situation?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to cotrol points when modifying a link?
Reply #1 - Dec 13th, 2012 at 7:20am
Print Post  
This is a validation event and the control won't raise it if it knows that the link cannot be dropped at current position anyway. You could set AllowUnconnectedLinks to true, and set e.Cancel in LinkModifying / LinkCreating handlers if e.Origin or e.Destination is null. If you have a custom link class, a better place to update the link points might be the UpdateModify method.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint