OK… assuming this is something like a GoBasicNode that has a “SelectionObject”, you would extend the GoShape that is the Shape of the node.
[Serializable]
public class CustomTreeEllipse : GoEllipse
{
public override void AddSelectionHandles(GoSelection sel, GoObject selectedObj)
{
base.AddSelectionHandles(sel, selectedObj);
if (selectedObj == sel.Primary)
{
// vertical
IGoHandle h1 = sel.CreateBoundingHandle(this, selectedObj);
GoShape h1s = h1.GoObject as GoShape;
if (h1s != null)
{
h1s.Pen = Pens.Red;
h1s.Bounds = new RectangleF(selectedObj.Center.X, selectedObj.Center.Y - 1000, 1, 2000);
}
// horizontal
IGoHandle h2 = sel.CreateBoundingHandle(this, selectedObj);
GoShape h2s = h2.GoObject as GoShape;
if (h2s != null)
{
h2s.Pen = Pens.Red;
h2s.Bounds = new RectangleF(selectedObj.Center.X-1000, selectedObj.Center.Y, 2000, 1);
}
}
}
}
and you would override CreateShape in the node class to create such a Shape object:
[Serializable]
public class CustomTreeBasicNode : GoBasicNode
{
protected override GoShape CreateShape(GoPort p)
{
// create the bigger circle/ellipse around and behind the port
GoShape e = new CustomTreeEllipse();
SizeF psize = p.Size;
e.Size = new SizeF(psize.Width + 2 * margin.Width,
psize.Height + 2 * margin.Height);
e.Selectable = false;
e.Resizable = false;
e.Reshapable = false;
e.Brush = Brushes.White;
return e;
}
private static readonly SizeF margin = new SizeF(7, 7);
}
note I’ve cheated on making the size of the red lines really be the width and height of the view, just using “+ and - 1000”. Zooming after selection isn’t going to change the size of the handle anyway.