Hello,
To receive ribbon event notifications from the Ribbon framework you can register an Event Tracing for Windows (ETW) listener. Event Trace consumer is for this purpose.
Consumers can process events from a log file or in real time. The OpenTrace function opens a real-time trace session or log file for consuming. The name of the event tracing session (LoggerName / Session Name) for Windows Ribbon Framework is EventLog-Microsoft-Windows-UIRibbon-Diagnostic. Refer to Consuming Events for detailed information.
Supported events for Tab as below:
Refer to EtwConsumer official sample for how to use the ETW consumer APIs.
Thank you!