This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello, I have a Connactable type, lets say it A. And it has two connections, one to B and one to C. When I relocate the connection which is from A to B, i want to prevent it to connect to C, which is already connected to A. So I hold on A's data which nodes it is connected and in CanRelocateConnection ,which i implemented from IDiagramConnectionRelocator, I return false if it is already connected to the new drop target. But it also prevents to relocate connection on node B too, because it is also already connected. But i need to relocate the connection on node B, because users may want to change the connection's connection point on B. I think IDiagramConnection parameter for CanRelocateConnection method does not hold a value for relocated connection's old source, its toConnectionPoint is set to null as soon as relocation started. So i need something like ConnectionRelocationInfo's OldDestination property for CanRelocateConnection to check if a connection is being tried to connect to old destination again, or maybe another way to do it. What may be the proper solution for this? Thanks for your help. Edit: I managed to do it after casting IDiagramConnectionPoint to DiagramNode and iterating on its connection points. Sorry for taking your time. |
|
|
No worries, good to hear you found a solution. Let us know if you run into other tricky scenarios when implementing your custom connection validation. Jason Fauchelle |
|