Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to prevent editing of control points of a link (Read 1606 times)
Dirk Woelfel
YaBB Newbies
*
Offline



Posts: 17
Joined: Jun 26th, 2006
How to prevent editing of control points of a link
Aug 26th, 2018 at 6:38pm
Print Post  
Hello,

I use control points of a link to obtain a special representation. I create these control points by source code and they should not be able to be changed interactively by the user.

How can I ensure that the user can mark the link (e.g. to delete it), but the control points are not displayed or cannot be moved by the user?

Regardless of the selected handle style, the control points are always visible and movable.

Thank you very much,

Dirk
  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: How to prevent editing of control points of a link
Reply #1 - Aug 27th, 2018 at 1:14pm
Print Post  
Hi,

You can use LinkStartModifying event and cancel user interactions, which attempt to move the link. For example:

Code
Select All
private void _diagram_LinkStartModifying(object sender, LinkValidationEventArgs e)
{
    e.Cancel = true;
    e.CancelDrag();
} 



Users will still be able to select and delete links even with this handler. To hide handles set the HandlesStyle to Invisible.

Regards,
Lyubo
  
Back to top
 
IP Logged
 
Dirk Woelfel
YaBB Newbies
*
Offline



Posts: 17
Joined: Jun 26th, 2006
Re: How to prevent editing of control points of a link
Reply #2 - Sep 10th, 2018 at 3:56pm
Print Post  
Thanks a lot! It works.

Dirk
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint