Nevron Forum

Lock edges in place

https://www.nevron.com/Forum/Topic5225.aspx

By Patrick Bergeron - Thursday, June 16, 2011

We would like for our users to be able to drag the shapes around using the mouse; however, we do not want to give them the ability to manipulate the edges between the shapes.  What is the easiest way to lock edges in place?  In other words, if I have 3 shapes: A, B, and C that are connected as follows:

A - B - C

The user should not be allowed to "disconnect" the edge from A to B and then move that edge to create a new edge from A to C:

A - C - B

Hope this makes sense.

By Nevron Support - Thursday, June 16, 2011

Hi,

In order to forbid the user disconnect a connector you should apply the following protections to it:

 

NAbilities protection = connector.Protection;

protection.ChangeStartPoint = true;

protection.ChangeEndPoint = true;

protection.MoveX = true;

protection.MoveY = true;

connector.Protection = protection;