i am using LinkTextStyle = LinkTextStyle.Rotate;
Here are my whole diagram settings i am initialy applying.
diagram.Behavior = Behavior.DrawShapes | Behavior.LinkShapes;
diagram.RouteLinks = true;
diagram.LinkRouter = new GridRouter();
diagram.LinkRouter.Diagram = diagram;
diagram.Width = 3840;
diagram.Height = 3840;
diagram.Bounds = new Rect(0, 0, 3840, 3840);
diagram.DelKeyAction = DelKeyAction.None;
diagram.AllowInplaceEdit = true;
diagram.AllowSelfLoops = false;
diagram.RestrictItemsToBounds = RestrictToBounds.InsideOnly;
diagram.LinkTextStyle = LinkTextStyle.Rotate;
diagram.LinkShape = LinkShape.Bezier;
diagram.CrossingRadius = 20;
diagram.LinkCrossings = LinkCrossings.Straight;
diagram.AllowMultipleResize = true;
diagram.RoundedLinks = false;
diagram.NodeEffects.Add(new GlassEffect());
diagram.NodeEffects.Add(new AeroEffect());
diagram.ShowAnchors = ShowAnchors.Always;
And these are the link settings for every link
link.AutoSnapToNode = false;
link.UseLayoutRounding = false;
link.DrawCrossings = true;
link.Dynamic = false;
link.Shape = LinkShape.Cascading;
link.TextStyle = LinkTextStyle.Rotate;
link.IgnoreLayout = false;
link.TextBrush = Brushes.Gray;
link.Stroke = Brushes.Gray;
link.HeadStroke = Brushes.Gray;
i tried with
link.UpdateFromPoints();
link.InvalidateMeasure();
as you have mentioned, but it didn't change the result.
I discovered, it must have some to do with the FontWeight set to Heavy or Bold.
If i don't set the FontWeight, the text is displayed at every time and is not disappearing as it at some particular links does (not at all of them inside the diagram) if i set FontWeight.
Maybe something with measuring the heigth of the link text ?
But this should get fixed by link.UpdateFromPoints();
link.InvalidateMeasure();, right ?