Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Cancelling event in ValidateAnchorPoint (Read 2071 times)
snype
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Jul 7th, 2011
Cancelling event in ValidateAnchorPoint
Jul 8th, 2011 at 5:16pm
Print Post  
I am trying add validation before a link is created between two nodes through AnchorPoints.

So I have added ValidateAnchorPoint event to the diagram. Here is my dummy code looks like.

Boolean b1 = true.
private void diagram_ValidateAnchorPoint(object sender, LinkValidationEventArgs e)
{          
   if (b1)
        e.Cancel = true;
}

So I assume in the above case as b1 is true and I am cancelling the event, the link should not be created between the nodes. But it does not seems to work the way I assume. Am I heading a wrong direction?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Cancelling event in ValidateAnchorPoint
Reply #1 - Jul 8th, 2011 at 5:23pm
Print Post  
ValidateAnchorPoint is raised to let you specify which points should be used, rather than letting the control choose them. Handle LinkCreating to prevent creating the link at all.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint