If using a derived node type, you could implement that by overriding Draw and DrawHandles:
public override void Draw(IGraphics graphics, RenderOptions options)
{
if (this == Parent.ActiveItem)
base.DrawHandles(graphics, Parent.ActiveItemHandlesStyle, options);
else if (Selected)
base.DrawHandles(graphics, Parent.SelectedItemHandlesStyle, options);
base.Draw(graphics, options);
}
public override void DrawHandles(IGraphics graphics, HandlesVisualStyle style, RenderOptions options)
{
}
For standard nodes you could draw handles in the background by handling DrawBackground event and calling Selection.Draw:
private void diagram_DrawBackground(object sender, DiagramEventArgs e)
{
diagram.Selection.Style = SelectionStyle.SelectionHandles;
diagram.Selection.Draw(e.Graphics, new RenderOptions());
}
but then you will have to stop standard handle rendering in some way, e.g. by assigning transparent brushes to ActiveItemHandlesStyle and SelectedItemHandlesStyle.
I hope that helps,
Stoyan