Custom GraphicsLayers show up in TOC (Engine 10)

Discussion created by edienske on Sep 6, 2010
Latest reply on Oct 11, 2010 by mhmdh2000
I have an Engine solution with a couple of custom-added graphicslayers, I have these because I want to describe to different events on these layers. If I add a TOCControl the layers appear in the TOC.

Users can see these layers in the TOC and customize their visibility. This is highly undesired, since they are associated with custom tools and commands - they should be "internal" layers. Therefore I'd like to hide them from the TOC, but this seems to be impossible.

Does anyone have a solution for this? If not, it might be an idea to add a "HideGraphicsLayers" property to TOCControl, please ESRI.