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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to disable center connection port

Thread ID:

Created:

Updated:

Platform:

Replies:

117021 Jul 21,2014 08:43 PM UTC Jul 23,2014 11:58 AM UTC WPF 1
loading
Tags: Diagram
Jeff
Asked On July 21, 2014 08:43 PM UTC

In my solution, I am setting a node's IsPortEnabled property to false, per your Diagram Builder sample.  A warning is output, stating that IsPortEnabled is obsolete, and that "PortVisibility covers all behaviors."  Two questions arise:

  1. Can I assume this means if I set the center port's PortVisibility is AlwaysHidden, that it will not be possible to connect to the center port
  2. How can I reliably obtain a reference to the center connection port?

Mohana Priya Raja [Syncfusion]
Replied On July 23, 2014 11:58 AM UTC

Hi Jeff,

Please find responses to your queries as below.

1.Can I assume this means if I set the center port's PortVisibility is AlwaysHidden, that it will not be possible to connect to the center port

By default, Connection to Centerport is always makes connection between Node and Connector at Node’s Boundary. So, PortVisibility does not affect this default behavior. Please refer to the below screenshot for default behavior.

Default Behavior :


 

 

2. How can I reliably obtain a reference to the center connection port?

Regarding “obtain a reference to the center connection port”, your requirement has been achieved by using Ports collection property of the Node. We have provided code snippet to represent our solution. Please refer to the below code snippet.

 

Code Snippet:

//getting centerport reference

ConnectionPort centerport = n.Ports[0] as ConnectionPort;

 

Here, n is instance of Node.

 

Please let us know if you have any concerns

Regards,

MohanaPriya R


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

;