Open MachineVisionxiaotan opened 3 months ago
Does the following answer help you? https://github.com/miroiu/nodify/wiki/FAQ#q-why-is-the-connection-not-following-the-connectors-when-i-move-a-node
Also, make sure that the binding for the Anchor
is set to OneWayToSource
.
I have already set Anchor OneWayToSource. I found that the issue of not displaying only occurs when the y coordinates of the two nodes are the same
I can't reproduce it. Can you give me more details?
https://github.com/user-attachments/assets/7e872d09-7904-45a6-9428-83ba362f52d8
Video is the effect. Initial positions of two nodes: Location=new System.Windows.Point(200, 200), Location = new System.Windows.Point(500, 200),
It works fine for me. There must be something wrong with your setup.
Please verify that:
PropertyChanged
event when a connection is added.Source
and Target
are bound to the corresponding connector Anchor
in the Connection
template/styleAnchor
is bound in a OneWayToSource
mode to the corresponding connector Anchor
in NodeInput
and NodeOutput
INotifyPropertyChanged
and the Anchor
property raises PropertyChanged
eventsAlso worth checking out: https://github.com/miroiu/nodify/wiki/Getting-Started#a-minimal-example
Move the viewport top-left a bit to check whether the connection is correctly added to the graph (it is added at 0, 0). If the Anchor
binding has problems, you will see something like this:
It's not related to binding, it just doesn't display when horizontal
https://github.com/user-attachments/assets/74991790-5f53-4025-b395-4a411263b20f
The reason is that I wrote SourceOffsetMode="Rectangle" TargetOffsetMode="Rectangle",delete them and everything will be fine.
This is my first time testing the Nodify library. When I add two nodes and place them in the editor, if there is a certain distance between them in the x direction, the connection line will not appear if I try to connect them directly without dragging the nodes first. Only after dragging the nodes will the connection line be displayed,what is the reason for this?