CustomLinkTool.cs 616 B

12345678910111213141516171819202122232425
  1. using Aga.Diagrams;
  2. using Aga.Diagrams.Controls;
  3. using Aga.Diagrams.Tools;
  4. using System.Windows;
  5. namespace FlowWorkEditDemo
  6. {
  7. class CustomLinkTool : LinkTool
  8. {
  9. public CustomLinkTool(DiagramView view) : base(view) { }
  10. protected override ILink CreateNewLink(IPort port)
  11. {
  12. var link = new OrthogonalLink();
  13. BindNewLinkToPort(port, link);
  14. return link;
  15. }
  16. protected override void UpdateLink(Point point, IPort port)
  17. {
  18. base.UpdateLink(point, port);
  19. var link = Link as OrthogonalLink;
  20. }
  21. }
  22. }