<?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 ICommandSubType Menu Items in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/icommandsubtype-menu-items/m-p/431273#M11677</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm using a context menu on my map in my ArcEngine application. To create the menu items I've create a class inheriting from BaseCommand and implementing ICommandSubType called "MapContextCommands."&amp;nbsp; When I populate the ToolbarMenuClass I use the following code for each menu item:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
mapContext.AddItem( new MapContextCommands(), 1, 0, false, esriCommandStyles.esriCommandStyleTextOnly );
mapContext.AddItem( new MapContextCommands(), 2, 0, false, esriCommandStyles.esriCommandStyleTextOnly );
and so on....
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I'm wonder is whether I have to create the class every time.&amp;nbsp; Would this work?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
MapContextCommands mapContextCommands = new MapContextCommands();

mapContext.AddItem( mapContextCommands, 1, 0, false, esriCommandStyles.esriCommandStyleTextOnly );
mapContext.AddItem( mapContextCommands, 2, 0, false, esriCommandStyles.esriCommandStyleTextOnly );
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Apr 2012 15:39:22 GMT</pubDate>
    <dc:creator>GeorgeFaraj</dc:creator>
    <dc:date>2012-04-11T15:39:22Z</dc:date>
    <item>
      <title>ICommandSubType Menu Items</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/icommandsubtype-menu-items/m-p/431273#M11677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm using a context menu on my map in my ArcEngine application. To create the menu items I've create a class inheriting from BaseCommand and implementing ICommandSubType called "MapContextCommands."&amp;nbsp; When I populate the ToolbarMenuClass I use the following code for each menu item:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
mapContext.AddItem( new MapContextCommands(), 1, 0, false, esriCommandStyles.esriCommandStyleTextOnly );
mapContext.AddItem( new MapContextCommands(), 2, 0, false, esriCommandStyles.esriCommandStyleTextOnly );
and so on....
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I'm wonder is whether I have to create the class every time.&amp;nbsp; Would this work?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
MapContextCommands mapContextCommands = new MapContextCommands();

mapContext.AddItem( mapContextCommands, 1, 0, false, esriCommandStyles.esriCommandStyleTextOnly );
mapContext.AddItem( mapContextCommands, 2, 0, false, esriCommandStyles.esriCommandStyleTextOnly );
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 15:39:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/icommandsubtype-menu-items/m-p/431273#M11677</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2012-04-11T15:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: ICommandSubType Menu Items</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/icommandsubtype-menu-items/m-p/431274#M11678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ignore please.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Answered my own questions.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 17:42:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/icommandsubtype-menu-items/m-p/431274#M11678</guid>
      <dc:creator>GeorgeFaraj</dc:creator>
      <dc:date>2012-04-11T17:42:46Z</dc:date>
    </item>
  </channel>
</rss>

