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

VSIX set command initial state disabled

$
0
0

I have a VSIX package where I use the autoloading feature

[ProvideAutoLoad(UIContextGuids80.SolutionExists)]

When I create my command I set the state to Disabled

CommandID menuCommandID = new CommandID(GuidList.guidMyPackageCmdSet, (int)PkgCmdIDList.MyCommand);
                menuItem = new MenuCommand(MenuItemCallback, menuCommandID);
                menuItem.Enabled = false;

But after Visual Studio starts the corresponding button in Tools menu is enabled, and isn't until I click the button and VS load the package that it gets disable.

How can I set the initial state of the button to disabled?


Viewing all articles
Browse latest Browse all 4410

Trending Articles



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