Using vsx how do you create a sub menu with commands?

走远了吗. 提交于 2019-11-30 14:48:12

Your Menu should have its parent set to a group instead of the top-level context menu. For example, try changing this line:

<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_PROJNODE"/>

to this line:

<Parent guid="guidSHLMainMenu" id="IDG_VS_CTXT_PROJECT_START"/>

You should now see "TryMainMenu" show up next to "Debug" on the project node's context menu. If you want your menu to exist in its own group on the top level context menu, you should define a new group with parent IDM_VS_CTXT_PROJNODE and set your menu's parent to that.

Alternatively, you can discover what the other existing groups are (besides IDG_VS_CTXT_PROJECT_START) by looking at SharedCmdPlace.vsct and finding Group elements with the following parent:

<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_PROJNODE"/>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!