We have a requirement that the label of Subgraph should be at topleft border of subgraph by default and then movable by user if required. I was abel to accomplish the first requirement using following function:
public override void LayoutLabel()
{
RectangleF borderArea = ComputeBorder();
base.Label.Position = new PointF(borderArea.X , borderArea.Y);
}
Now the problem is that it is not allowing me to move the label to some other position.
Could you please suggest on how to make it movable?
One thing I observed is that, when I move label outside current bounds,
the subgraph is expanded but only the expanded area is not repainted with the background color that was specified and remains white. But this happens only with Label
and not with other GoNode child objects added to the subgraph.
If you are using the default background then, it gets painted by PaintDecoration as a Rounded Rectangle with a rectangle size returned by GoSubGraph.ComputeBorder.
ComputeBorder returns ComputeInsideMargins plus the margins.
and... you're skipping your object in ComputeInsideMargins.