Select to view content in your preferred language

How to show addin context menu

328
1
01-26-2011 10:58 AM
TimWhiteaker
Frequent Contributor
I created a menu in an add-in.  I set isShortcutMenu="true" in Config.esriaddinx.  How do I get the context menu to show up when I right-click with my custom tool active?  In Config.esriaddinx, the portion for my menu looks like this.

        <Menu id="The_University_of_ArcGIS10_Add_in_Example_MyContextMenu" caption="Context Menu with MultiItems" isRootMenu="true" isShortcutMenu="true">
          <Items>
            <Button refID="esriArcMapUI.FullExtentCommand" />
          </Items>
        </Menu>


I thought I could get to the menu in the OnContextMenu event of my tool using UIDClass and ThisAddIn.IDs, but menus aren't accessible like buttons and tools are in this manner.  No ID shows up for my menu.

I also thought maybe I could add the menu as an attribute or child element of my <Tool> element in Config.esriaddinx, but that doesn't seem to be an option since it's not in the schema.
0 Kudos
1 Reply
TimWhiteaker
Frequent Contributor
0 Kudos