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

Line Connector

Hello,

I am evaluating the product right now and my application implements custom drag/drop behavior.
I need to drag from syncfusion:GroupViewItem into a Diagram control.

1) While I am dragging, the indicators on the rulers of the Diagram are frozen. After I drop a control I need to know exact position - I am using something like this
xiEvent.GetPosition(DiagramView.Page), is that correct assumption?

2) I need to drop a new LineConnector. After I create a new one with HeadNode/TailNode as null the control throws exception, at the same time if I drop a connector from the Diagram Paellete a connector is not connected to any node and it works (do u have some kind of hidden nodes for that?). How can I simulated drag and drop functionality don't using Diagram Pallete?

Thank you in advance.


1 Reply

JR Jegan R Syncfusion Team September 30, 2010 07:03 AM UTC

Hi Arthur,

Thank you for evaluating Syncfusion product

Please find the answers for your queries in line

1) It is by design that the rulers are frozen. When new items are dragged into DiagramPage, markers on the ruler will not show the current mouse position.
Yes, your assumption is correct. xiEvent.GetPosition(DiagramView.Page) can be used to get the mouse position related to the DiagramPage’s Drop event, where xiEvent is the DragEventArgs.

2) It is not mandatory for LineCommector to have HeadNode and TailNode. However, in order to draw lines, corresponding StartPointPosition and EndPointPosition has to be specified. Regarding dropping new items into DiagramPage, without using SymbolPalette, DigarmPage’s drop event can be used to determine what kind of object is dropped. Also on this drop event new lineconnector can be drawn.

We have created a sample which illustrates these scenarios. Please refer to the sample under the following link.

Sample Link: http://files.syncfusion.com/Support/Diagram.WPF/Samples/72601/DragDropConnector.zip

In this sample three GroupViewItems representing Straight, Orthogonal, Bezier LineConnectors are added to the Syncfusion GroupBar control. This Group bar acts as a SymbolPalette. When GroupViewItems are dropped onto the DiagramPage, corresponding line connectors will be created.

Please let us know if you need any further assistance.

Regards,
Jegan


Loader.
Live Chat Icon For mobile
Up arrow icon