Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

How to access visual studio "Reset Toolbar" command and retrieve "Add or Remove Buttons" CommandBarButton

$
0
0

Hi, 

I am developing VSPackage and I want listen to AfterExecute event of "Reset Toolbar" command. I am using 

dte.Events.CommandEvents[VSConstants.GUID_VSStandardCommandSet97.ToString("B"), ...] , but I can't find the correct command id listen to "Reset Toolbar" command. I want place my custom logic after the "Reset Toolbar" command executed. 

Are there a way to do this?

Another question is am trying to find the "Add or Remove Buttons" toolbar context menu to change image of one of its menu items dynamically.

I tried to search it in CommandBars list, but I didn't know what is the correct commandBarName in order to retrieve the "Add or Remove Buttons" context menu.

What should I use in order to retrieve the correct CommandBar?

 var commandBars = ((CommandBars) dte.CommandBars);
  CommandBar cb = commandBars[commandBarName];


Thanks,

Marina


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>