nodify icon indicating copy to clipboard operation
nodify copied to clipboard

[Question] Anchor on Connection?

Open schokee opened this issue 6 months ago • 1 comments

If possible, could you suggest a way to have an Anchor point on the mid-point of a Connection such that the anchor position is updated whenever the connection is re-routed/updated?

schokee avatar Aug 24 '25 10:08 schokee

Inherit from one of the built-in connection classes and call the GetTextPosition whenever the SourcePositionProperty or the TargetPositionProperty dependency properties change (or in the OnRender method if you override it) to get the mid-point. Then create a new dependency property (if you want to use data binding) and set its value whenever you calculate the new mid-point. There's an example of how to use the GetTextPosition here: https://github.com/miroiu/nodify/issues/121#issuecomment-2233241719

miroiu avatar Aug 27 '25 11:08 miroiu