Recently I’ve made demo for fresh Sitecore developers in company where I’m working now. The demo was about customization of Content Editor interface and specifically how to add custom button to ribbon and show/hide it dependent on some condition. I did that previously and how-tos before for me was this answer. So I just inherited from Sitecore.Shell.Framework.Commands.Command class for my custom command one. But if in case of Execute method all was fine that QueryState one did not fire. After some research I found that in Sitecore 8.1 for this purpose instead of using old good Sitecore.Shell.Framework.Commands.Command I have to use Sitecore.Shell.Applications.WebEdit.Commands.WebEditCommand from Sitecore.ExperienceEditor assembly.