79535333

Date: 2025-03-26 03:32:53
Score: 2
Natty:
Report link

Is it possible to switch button icon with Visual Studio extension toolbar?

I am afraid not. I think there is no built-in feature/class to switch button icon upon click event.

From looking at this document OleMenuCommand Class

If the command is added dynamically, it makes more sense to use OleMenuCommand, in order to implement the BeforeQueryStatus handler.

Looks like we can update the status of the menu command in this method OnBeforeQueryStatus by changing the Visible, Checked, and Enabled properties on the OleMenuCommand object.

You can change the text of a menu command by following this guide1

You can change the appearance of a command by following this guide2

However i would suggest you can also report this issue at Visual Studio Forum to double confirm if there is any available feature to achieve it. That will allow you to directly interact with the appropriate product group, and make it more convenient for the product group to collect and categorize your issue.

Reasons:
  • Blacklisted phrase (1): this guide
  • Blacklisted phrase (1): this document
  • Blacklisted phrase (1): Is it possible to
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Is it
  • High reputation (-1):
Posted by: Dou Xu-MSFT