I've got multiple packages registred in my application. One of the packages works perfectly, however on the other QueryStatus never gets called. This package is defined as (some lines omitted for clarity):
All of the events are raised, except for the last one. This doesn't work on any computer it's installed or, nor any other developer station, so it's not related to issues with my machine.
You cannot attach event handlers to ctd groups as a group represents a conceptual layer; you should rather attach handlers to concrete items such as menus, buttons, etc. Now having said that, we do not give you the ability to interfere with the status of ribbon tabs as that violates the guidelines for the Microsoft Office Fluent UI after which we modeled our ribbon.
Can you tell us what you are trying to achieve through your last query status handler?
On another note, and you are probably aware of this, you can register a query status handler and an invoke handler within the same RegisterHandler(commandID, invokeHandler, queryStatusHandler) call, there is no need to split it in two and use null to fill the gap. Two calls would still work though as you have it right now.
The exact same code works fine in another package.
We are trying to turn off the tab, which we are able to do in another package. FWIW, I don't believe this violates the Office Fluent UI guidelines, as ribbons can be context sensitive (notice how the developer tab can be turned on/off in MS Office products, for example).
You are right, my previous statement about tab visibility is inaccurate as a general statement. I digged a little deeper, and found out the following:
1. We do no let you interfere with the visibility of Select tabs even if you try to register query status handlers to manipulate their state.
2. Once the visibility of a ribbon tab is determined at the launch of the application, it cannot be changed during the same session. In other words, a tab does not appear and disappear dynamically while the application is running, but is rather either visible or invisible for as long as the application instance is running.
3. Dynamic ribbon tab behavior is available through contextual tabs. For an example, look at the SPAdmin Users and Groups.
For you purpose, try registering a query status handler for TGAdminRibbonTab instead of RibbonTabGroup1.
// Determine whether to show or hide the tab from the user
base.RegisterHandler(TGAdminScreensPackage.RibbonTabGroup1, null, this.TGAdminRibbonTab_QueryStatus);
I added the style Tag, but still doesn't seem to make a difference. I'm a bit busy on other things right now, but I'll work with it a bit more when I get time.