Event capturing movement of transition


Is there a method to track position change of points in case when all the states and transaction are selected and then moving them all together.
I am using UpdateRouteDataPoints in my custom part manager. Its working fine in case if transition is reshaped or a single state is relocated but in case where all the items are relocated together the method is not called as shape is not changed in that case.

thanks in advance

I don’t believe that you can count on PartManager.UpdateRouteDataPoints to be called whenever the Link Route has been changed. I can imagine other situations where the route has changed but UpdateRouteDataPoints is not called, besides the case that you mention.

Note how in the samples the Save_Click function explicitly copies the Route.Points information to the model data property.

Yes I have noticed that but in our case we don’t have a save button logic. All logic is on property changed events.
So is there any such event for points?

Not that I can tell. The internal implementation of the Route.Points property always uses a List<Point>, so you cannot have it use an ObservableCollection<Point>.

We could have Route.MovePoints cause PartManager.UpdateRouteDataPoints to be called, but I’m concerned that that might give someone a false sense of coverage. I guess that we should consider extending the usage of that method to cover all possible modifications. At least that method is called in a delayed fashion, which is better than something that implements INotifyCollectionChanged.

At least for the case you describe, you could implement a Diagram.SelectionMoved event handler to call PartManager.UpdateRouteDataPoints.

Thanks for your support.
For now i have used Diagram.SelectionMoved but is there a chance to find a universal implementation for all the cases.