erikadade

Remove custom contents view from ArcMap TOC?

Discussion created by erikadade on Apr 29, 2014
The ESRI sample, TOCLayerFilterVB2010, implements a custom TOC view for map layers. For my purposes, I need to be able to turn it on/off, meaning add and remove that view from the TOC horizontal icon bar programmatically.

Can someone explain how the custom contents view in this sample gets instantiated? I find that if the dll is registered, it appears. The only way to get rid of it in any ArcMap document is to unregister it. Loading a blank document or deleting the Normal.mxt template does not have any effect.

Ideally, I will have a command toggle that instantiates and destroys the view. I cannot figure out how to control its creation. The object gets created when ArcMap starts and before any document is loaded. The windows form initialization is a private method, created by the windows form designer automatically, and the tree view object itself is a private property as well.

Thanks for your help!

Outcomes