/// <summary> /// Update path based on two points /// </summary> /// <param name="source"></param> /// <param name="sink"></param> public void UpdatePath(Point source, Point sink) { IPathFinder pathFinder = new OrthogonalPathFinder { CurrentDiagram = Project.Current.Children.FindByCanvas(ContainerCanvas) }; contentObject.Stops.Clear(); contentObject.Stops.AddRange(pathFinder.GetPath(source, sink)); }
/// <summary> /// Update path based on source and sink connector /// </summary> public void UpdatePath() { IPathFinder pathFinder = new OrthogonalPathFinder { Connection = contentObject, CurrentDiagram = Project.Current.Children.FindByCanvas(ContainerCanvas) }; contentObject.Stops.Clear(); contentObject.Stops.AddRange(pathFinder.GetPath()); }