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
|
Repro: Take the FlowDiagrams.ConnectionPointRelocation demo. replace the SwapPoints_Click behaviour in Window.xaml.cs with: In essence - programattically set the bounds of the node.click the "Swap points" button and note: * that the connection point Positions *DO* move. * that the connection paths *DO NOT* redraw or recalculate. Now drag the node position, or drag a move-handle on the node * The connection paths are recalculated. I can't work out a good way to solve this at all without Mindscape changes. The issue is that only the DiagramSurface triggers FormatConnections() behaviours, and they're all private, secret and non-hook-innable. The best option is to mimic a node move or move-handle drag and raise a MoveThumb.MovedEvent or SizeThumb.SizedEvent, but those are based on Elements, not base node/connection objects so there's a heck of a lot of plumbing up to do to turn a OnPropertyChanged("Bounds") event on a node into a valiud event. Ideal solution : when a ConnectionPoint.Position changes, any connections connected to that point have their Pathfinder is requeried, and hence the segments are regenerated. Other solutions that would be ok : Expose something on the Surface, Connection or ConnectionPoint to manually refresh the same. thanks!
|
|
|
any ideas on how i can work around this problem? |
|
|
Hello mcdrewski To fix this issue, you could use the DiagramSurface.FormatAllConnectionElements() method to apply pathfinding to all the connections in the diagram. Cheers |
|
|
That's fine as an interim measure, but is not going to work in the long-term. |
|
|
Hello mcdrewski In terms of the repro you mentioned, I have made an internal fix for this and it will be available from the next nightly build. Now the appropriate connections will be reformatted automatically when the bounds of an IDiagramNode is changed. Let us know if there are still issues due to causeing a connection point to be moved and not having the connections reformatted where they should be. Cheers |
|