I am using the ESRI sample, TOCLayerFilterVB2010, which implements a custom TOC view for map layers, as a prototype. 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. Deleting the Normal.mxt template does not have any effect.

Ideally, I would like to have a command toggle that instantiates and destroys the view. I cannot figure out how to control its creation.


Have you considered using a Dockable Window AddIn? I know you an control their appearance with say a button on a toolbar using the IDockableWindow interface. It may be an easier approach?

If you have a look at the Get Dockable Window Snippet this will give you a basic idea of how to get a handle on a window which you can show/hide.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.