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

  • Question

  • 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

    Wednesday, February 4, 2015 8:10 AM

Answers

All replies