I’m using v 1.2.6.4 with WPF. I need to be able to drag a link from a node and auto scroll when the link reaches the edge of the diagram so I can connect to nodes that may not be visible without scrolling. As a test, I am trying to get this approach to work on the LogicCircuit page in the GoWpfDemo demo solution since it is similar to the application I will be modifying. Can you suggest how I might get this behavior to work on LogicCircuit?
Just call Diagram.Panel.DoAutoScroll in an override of DoMouseMove.
Something like:
public class ScrollingLinkingTool : LinkingTool {
public override void DoMouseMove() {
base.DoMouseMove();
this.Diagram.Panel.DoAutoScroll(this.Diagram.LastMousePointInModel);
}
}
Install this by replacing the standard Diagram.LinkingTool, either in XAML or in code.
You might want to do the same thing with the RelinkingTool, too, if it’s appropriate in your app.
Worked great! Thanks.