Hi we are trying to prevent drawing connectors on the diagram and instead require our custom connector to be drawn. We are cancelling the ItemAdding event on the diagram and this is preventing the connector from appearing on the canvas, however a diagramConnection is still attached to the outgoingConnections of the Node on which the drawing occurred.
Q1. Is this intended behaviour? i would have expected the cancelling of the add to do both
I've noticed that if we set ConnectionPointsDisplayMode="Never" then you dont get the pointer, unless you have custom connection points defined on the shapes.
Q2. Is there a way of disabling the drawing or do we need to remove this ourselves manually?
Regards
Nick
by the way - we are using a service release of 16.1
Hello Nick,
I have been trying to reproduce the problem you described but not successful.
I have created a sample of XamDiagram along with XamDiagramToolbox, and canceled XamDiagram's ItemAdding event.Can you please run this project on your PC, and let me know if your problem is reproducible with this?
Thank you,Mihoko Kamiishi
Hi
I've reproduced it in your application
you just need to break on the extra code in the itemadding event and look at the output window.
Hi Mihoko,
If you drag a connector from the toolbox the cancel works as expected.
If however you draw a DiagramConnection directly on the canvas , by clicking on a connectionpoint of the decision shape and dragging using the pencil tool (do not drag the connector shape from the toolbox) , then you should see the behaviour that i'm talking about
the diagramconnection is cancelled from being added to the diagram, however the new diagramConnection remains in the outgoingconnections of the node which was drawn on.
The only way i've worked around this is to:
1. not use the cancel property
2. detect the difference between a drawn connector and a dragged connector shape (we have custom shapes in our toolbox)
3. Remove the new connection in the Diagram ItemAdded event
Further, i've discovered that my workaround only work most of the time.
If i DRAW a connector that ends up having its start and end on the same shape.
If i then try to delete that DiagramConnection from the diagram , it is removed from the diagram and the outgoingconnections of the shape but not the incomingconnections of the shape.
:(
I have investigated your issue, and I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have created a private case‘CAS-185317-T4J5M2 ‘ and logged this behavior in our internal tracking system with a Development ID of 239328. This will be assigned to a developer in a future sprint to review my investigation and confirm my findings or to offer a fix, or other resolution.
You can also continue to send updates to this case at any time.You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site. Please let me know if you need more information.