What are the ActualWidth and ActualHeight of the first Link? The one that had both route points in the viewport.
It correspond to :
Actualwidth = |Point1.X - Point2.X|
ActualHeightt = |Point1.Y - Point2.Y|
with Point1 and Point2, point added to the Route
Is that seemingly missing Link actually in the visual tree?
Link is not present in visual tree as you can see in copy screen below (Right part)., when only second route point is in the viewport.
You’re doing everything in a transaction, yes?
It makes no differences if I do it within a transaction. At least I see no differences with or without transaction.
Does the problem happen when the “from” point is in the viewport but the “to” point isn’t?
No, if only the first route point is in the viewport, it works fine.
If by setting point in the route when the first point to be displayed is the to point I exchange both points (it means that I add first the to point) the link is displayed but the direction on the file is wrongly displayed.
Does the link data object have the route information in it? How are you assigning the Link.Route?
Route is calculated separately and data are copied to the route like this :
var link = AddLinkForData(item); // link is added
link.Route.AddPoint(points.Item1); // points is a Tuple<Point, Point>, item1 = from, item2 = to
link.Route.AddPoint(points.Item2);
Here an example where only second route point is in the viewport, and when only first route point is in the viewport.
Resume:
Route is always set like link.Route.Points.{‘From’, ‘to’}.
Link is not displayed when first point specified to the route is not present in the viewport.