EndSegmentLength

Hi,
I am doing some custom drawing of links by overriding the link classes paint method (I m calling base.Paint).
However, I see some amount of sapce between the end of the link and the start(base) of the “to” arrow.
Setting the To Port’s EndSegmentLength to the To Arrows Height seemed to fix the problem. (since the EndSegmentLength by default was 10 and the To Arrows Height was less than 10)
However, whenever I change the EndSegmentLength, the change is not reflected immediately. When I move the Iconic Node, whose port’s EndSegmentLength was changed, only then the Link and To Arrow seemed to get positioned such that there is no space between the link and the To Arrow.
Can you please tell me whether I am on the right track and whether this is a refresh related issue. I have tried using InvalidateViews call of To Port, Link and the To Node, but it isnt working.
Thanks,
Rafique

Setting GoPort.EndSegmentLength will call IGoLink.OnPortChanged which in turn calls GoLink.CalculateStroke. That should cause the end point of the link to be adjusted to correspond to the new value of GoPort.GetToLinkPoint.
As long as your paint methods respect the points in the link, that ought to work OK.
Perhaps you have GoObject.Initializing set to true? Perhaps you have overridden OnPortChanged or CalculateStroke or one of the methods it calls? What painting are you doing?

Well I have been able to fix this problem by explicitly calling CalculateStroke, after setting the EndSegmentLength property and before calling InvalidateViews(on the link).
Thanks & Regards,
Rafique