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. Image for the cookie policy date
close icon

How do setting OrthogonalConnector automatic steer clear of fraise

Dear Mr. or Ms.
Hello!
How do setting OrthogonalConnector
automatic steer clear of fraise?
Thank you!

3 Replies

MF Meera Fathima Syncfusion Team July 16, 2007 01:36 PM UTC

Hello Lx,

Thanks for your interest in Syncfusion products.

If your intention is to create orthogonal line connector between nodes, you can achieve this by using the OrthogonalConnector class that is available in Essential Diagram. This is demonstrated in many of the diagram samples. Please refer the Diagram Samples\In Depth\NetWork Flow Model sample's Form1.ConnectNodes(...) method.

Below is the sample code snippet for your reference.

PointF[] pts = new PointF[]{ PointF.Empty, new PointF( 0,1 ) };
OrthogonalConnector line = new OrthogonalConnector( pts[0], pts[1] );
line.HeadDecorator.DecoratorShape = DecoratorShape.Filled45Arrow;

this.diagram1.Model.AppendChild( line );

parentNode.CentralPort.TryConnect( line.TailEndPoint );
subNode.CentralPort.TryConnect( line.HeadEndPoint );

Please look into the sample and if I have misunderstood your requirement, could you please explain me in detail, so that I can work in
depth and try to send a better solution?

Best Regards,
Meera.

Syncfusion, Inc.
http://www.syncfusion.com/



LX lx July 17, 2007 12:25 AM UTC

Hello Meera Fathima!
Thank your helps
Our requirement in that file.

a1.zip


J. J.Nagarajan Syncfusion Team July 17, 2007 08:05 PM UTC

Hi LX,

Thanks for the diagram file. If you want to automatically change the line routing of the Orthogonal Connector, then you have to set Model.LineRoutingEnabled property to true. Please refer to the following code snippet.

this.diagram.Model.LineRoutingEnabled = true;
OrthogonalConnector line = new OrthogonalConnector(symbol1.PinPoint, symbol2.PinPoint);
symbols.Add( line );
this.diagram.Model.AppendChildren(symbols, out position);
symbol1.CentralPort.TryConnect(line.HeadEndPoint);
symbol2.CentralPort.TryConnect(line.TailEndPoint);
this.diagram.Model.LineRouter.RouteConnector(line);
this.diagram.Model.EndUpdate();

I have attached the sample that demonstrates this completely. You can download this sample from the following page.

http://websamples.syncfusion.com/samples/Diagram.Windows/F64108/main.htm

Please refer to the sample and let me know if you have any questions.

Thanks,
Nagaraj

Loader.
Live Chat Icon For mobile
Up arrow icon