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.
Unfortunately, activation email could not send to your email. Please try again.

connector can be add with no head node or end node

Thread ID:

Created:

Updated:

Platform:

Replies:

106525 Jan 11,2013 03:59 AM Jan 22,2013 12:22 AM WPF 8
loading
Tags: Diagram
petzold
Asked On January 11, 2013 03:59 AM

    i'm using syncfusion since 9.4,in that edition make a connection must hit a head node and a end node,it's work fine,but,when i update to 10.4,things changed,connection can draw without head node or end node,any thing can do to prevent drawing that connector without head node or end node?
    your help is saying that "If a node is not hit while making a connection, then no connector gets added."


diagram_1618d896.zip

Sudhakar C [Syncfusion]
Replied On January 11, 2013 06:34 AM

Hi Ado,

Since version 10.3.0.43 onwards we have replicate the EnableConnection property of the diagram view with DrawingTools property of the diagram view. Please find the changes in below.

Behavior Changes :

1.       When we set true to EnableConnection property of the diagram view, the EnableConnection property will be automatically changed to false and also it will automatically set true to EnableDrawingTools property of the diagram view. By default, we can draw orthogonal LineConnector otherwise we can set the DrawingTool (Arc, Bezier, Straight & Orthogonal) also.

2.         In our old behavior, when we set true to Enable Connection property, we should draw the connection between element to element. For example, Node à Node , Port ­à Port , Node à Port (or) Port à Node.

 

Now, we can draw the Line Connector anywhere in diagram page. For example, we can draw the LineConnector between Element to Element / Element to any position / Any Position to any Position.

 

Please find the respose for your requirement in below.

 

                                    Query

                                    Response

your help is saying that "If a node is not hit while making a connection, then no connector gets added."

We have created a sample based on your requirement. In that sample, if the mouse doesn’t hit the node, while creating the connection, we have removed that created Line Connector from Diagram Model.

 

Now, the connectors will be added only when you create the connection between two nodes. And also, you can use the Connectors in SymbolPalette as usual.

 

For more inforamtion, please refe the attached sample.

 

 

Please let us know if you have any conerns on this.

 

Regards,

Sudhakar.C



ConnectionWillNotAddUntilHitTheNode_ebcdf93d.zip

petzold
Replied On January 13, 2013 10:11 AM

Thanks a lot!
 it's work fine now,but it's to complex,i have to update my old application to adapt this update,if didn't need these code,just change a property,it will be pleasant.


petzold
Replied On January 13, 2013 11:24 AM

another problem trouble me,after i draw the line(has a head node and a tail node),then i move the connectionline out of the range of head node or tail node,then the line lost the head node or tail node


Sudhakar C [Syncfusion]
Replied On January 16, 2013 01:28 AM

Hi Ado,

 

                             Query

                            Response

It's work fine now,but it's to complex,i have to update my old application to adapt this update,if didn't need these code,just change a property,it will be pleasant

We have created a feature request for Support to provide some valid information while creating the connection. This feature can be tracked through our Feature Management

http://www.syncfusion.com/support/directtrac/features

 

However, we have modified the sample to meet your requirement as simple. In that sample, we have registered the ObjectDrawn event of the diagram view. This event will be fire when we draw the element using the drawing tools property of the diagram view.

 

So, when we draw the LineConnector, this event will be fire. Now, in this event we have to check whether the Line connector have HeadNode & TailNode, if not we can remove the LineConnector from diagram model. For  more information please refer the following sample.

 

another problem trouble me,after i draw the line(has a head node and a tail node),then i move the connectionline out of the range of head node or tail node,then the line lost the head node or tail node

Once you move the Line Connector from HeadNode / TaileNode to another Node (or) empty space, the connection will be disconnected from that HeadNode / TailNode.

 

For example, we have two nodes named “NodeA (consider which is HeadNode) & NodeB (consider which is TailNode)”. If we move the Line Connector from “NodeA” to empty space, the HeadNode will be disconnect. Now, the HeadNode of that Line Connector is Null.  (or) If you move the Line Connector from “NodeA” to another Node (“NodeC”), the HeadNode of that Line Connector will be changed from “NodeA” to “NodeC”. For more information please refer the following video.

 

Note : Video is attached with the sample.  

 

Please let us know if you require further assistance on this.

 

Regards,

Sudhakar.C 



ConnectionWillNotAddUntilHitTheNodeNew_f94307b3.zip

petzold
Replied On January 17, 2013 03:48 AM

thanks very much,i'm glad to hear that you can consider that feature,i'm using this control to building a workflow designer,the rule fobid the line lose headnode or endnode,in 9.4 version,i was disallow to draw a line without headnode and endnode,but user can move the line to a empty space,i'm trouble with it,i'm expect a property to control if a line can without headnode or endnode,if user move the line to a empty space then cancel the action.


Sudhakar C [Syncfusion]
Replied On January 18, 2013 01:11 AM

Hi Petzold,

 

                                      Query

                                      Response

i was disallow to draw a line without headnode and endnode,but user can move the line to a empty space,i'm trouble with it

In the provided sample in our last update your requirement is working fine.

 

In that sample, we can’t draw the connection if the mouse doesn’t hit any Node while draw the connection. And also, after creating the Connection, we can move the Line Connector to empty space (or) move to the another Node. For more information please refer the below video.

 

If you still face any trouble while move the LineConnector to empty space, please revert us with more infoatmion, such as video.

i'm expect a property to control if a line can without headnode or endnode,

By default, we can draw the Line Connector without HeadNode / TailNode. Please refer the below sample & video. In that sample, if you click the button named “Connection”, the EnableConnection property will be enable and you can draw the Line Connector anywhere in the diagram page.

if user move the line to a empty space then cancel the action.

 

We suspect that your requirement is if the user move the Line Connector to empty space, it will be reverted to it’s old HeadNode / Tail Node.

 

We have created a simple sample for your requirement. In that sample, if the HeadNode / TailNode is changed then we have check whether the Line Connector is moved to empty space or another Node. If the Line Connector is moved to empty space, we have reverted to it’s previous HeadNode/ TailNode.

 

For more information please refer sample & video in below.

 

Please let us know if you have any concerns on this.

 

Regards,

Sudhakar.C 



ForumSamples_e06d5b78.zip

petzold
Replied On January 21, 2013 12:51 AM

Thanks very much,the last video and example is what i wanted.


Sudhakar C [Syncfusion]
Replied On January 22, 2013 12:22 AM

Hi Petzold,

 

Thanks for the reply. Please let us know if you have any other concerns. As always, we will be happy to assist you. Thanks for using Syncfusion Products.

 

Regards,

Sudhakar.C 


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.

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.

;