<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to collapse a layer in the TOC programmatically in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-collapse-a-layer-in-the-toc/m-p/138657#M3583</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The ILegendGroup.Visible property indicates whether or not a layer's entry in the table of contents is expanded or collapsed. If a layer has only one legend group, then if Visible = True, then the layer is expanded. If a layer has more than one legend group, then the rule is that if any of the the layer's legend groups are visible, then the layer's entry in the table of contents is expanded. For more information on the property, please check:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//0012000007n3000000"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//0012000007n3000000&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Mar 2011 19:51:03 GMT</pubDate>
    <dc:creator>YaminiManickam</dc:creator>
    <dc:date>2011-03-09T19:51:03Z</dc:date>
    <item>
      <title>How to collapse a layer in the TOC programmatically</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-collapse-a-layer-in-the-toc/m-p/138656#M3582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In the following snippit of code, I am attempting to collapse a layer in the TOC.&amp;nbsp; However, this doesn't seem to be working. Is there a way to do that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IMap aMap = axMapControl1.ActiveView.FocusMap;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ILayer pLayer = aMap.get_Layer(0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INALayer2 anNALyr = (INALayer2)pLayer;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; anNALyr.Expanded = false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; axTOCControl1.Refresh();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Renee&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 17:25:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-collapse-a-layer-in-the-toc/m-p/138656#M3582</guid>
      <dc:creator>ReneeCammarere</dc:creator>
      <dc:date>2011-03-09T17:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to collapse a layer in the TOC programmatically</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-collapse-a-layer-in-the-toc/m-p/138657#M3583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The ILegendGroup.Visible property indicates whether or not a layer's entry in the table of contents is expanded or collapsed. If a layer has only one legend group, then if Visible = True, then the layer is expanded. If a layer has more than one legend group, then the rule is that if any of the the layer's legend groups are visible, then the layer's entry in the table of contents is expanded. For more information on the property, please check:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//0012000007n3000000"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//0012000007n3000000&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 19:51:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-collapse-a-layer-in-the-toc/m-p/138657#M3583</guid>
      <dc:creator>YaminiManickam</dc:creator>
      <dc:date>2011-03-09T19:51:03Z</dc:date>
    </item>
  </channel>
</rss>

