简体   繁体   中英

Add context menu based on multiple selection of project items across solution using visual studio addin

I have been working on visual studio Add-in for quiet some time.

I need to add context menu for project item. This can done as follows.

CommandBar vsBarItem = cmdBars["Item"]; //the pop up for clicking a project Item

This context menu is visible only on the single/multiple selection of project items inside a single project selection.

Is there a way to add context menu for selection of multiple project items inside the solution ( irrespective of the project being selected). To be more precise, for ex

I have 2 projects in solution namely Project A and project B. If Project A contains projectItem1, ProjectItem2 and If Project B contains projectItem3, projectItem4.

I need a context menu when I select ProjectItem1 and ProjectItem4.

References:

I tried all the below options but in vain :(

CommandBar vsBarMultipleSelection = cmdBars["Multi-Select"];
CommandBar vsBarMultipleSelection = cmdBars["Multiple selections"];

Please let me know which item of commandBar API should I use, so that I will have context menu for multiple selection.

Thanks in Advance,

Thanks to Carlos from Microsoft forum.

My question is answered in the link below. It might help others who are looking for the same.

http://social.msdn.microsoft.com/Forums/en-US/68daca69-5b8c-4437-b73e-a9a3203cb683/add-context-menu-based-on-multiple-selection-of-project-items-across-solution-using-visual-studio?forum=vsx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM