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

后端 未结 1 1323

I have created the following vsct file xml.




        
相关标签:
1条回答
  • 2021-01-03 02:17

    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"/>
    
    0 讨论(0)
提交回复
热议问题