In the following snippit of code, I am attempting to collapse a layer in the TOC. However, this doesn't seem to be working. Is there a way to do that?
IMap aMap = axMapControl1.ActiveView.FocusMap;
ILayer pLayer = aMap.get_Layer(0);
INALayer2 anNALyr = (INALayer2)pLayer;
anNALyr.Expanded = false;
axTOCControl1.Refresh();
Thanks!
Renee