madufit1
madufit1

Reputation: 216

Visual studio Toolbars menu items like menu item in VSIX

Does anyone knows how to implement menu item with toggle icon similar to visual studio Toolbar menu. enter image description here

Upvotes: 2

Views: 509

Answers (2)

madufit1
madufit1

Reputation: 216

Thank you Jack for your reply. Solution would be adding two menu items(with and without checkbox icon) and toggle the visibility state of both menu items in BeforeQueryStatus event.

Upvotes: 0

Jack Zhai
Jack Zhai

Reputation: 6436

You need to create a class to handles the command´s BeforeQueryStatus event and use the checkbox in your side.

The simliar issue has been asked here:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/f3acc18c-b176-4f06-a8d1-cccff3d4bf7f/how-to-disable-and-enable-menu-commands-in-vspackage?forum=vsx

How to create command menu item with checkbox?

Upvotes: 1

Related Questions