Listening for Ribbon Events

The Windows Ribbon framework uses the Event Tracing for Windows (ETW) infrastructure to enable developers to learn how users are interacting with their application's ribbon.

Introduction

The Ribbon framework event mechanism is designed such that the framework reports ribbon UI events to the application so you can monitor user activity, learn their interaction patterns, and assess usage trends. This information can be used to refine the user experience for future iterations of your ribbon app.

Using the Ribbon framework events involves the following:

  1. The ribbon application must register an Event Tracing for Windows (ETW) listener to receive ribbon event notifications from the Ribbon framework.
  2. The Ribbon framework fires ribbon UI event callbacks at run time, if the application has registered an Event Tracing for Windows (ETW) listener.

Supported events

The events exposed to ribbon applications are described in the following table.

Event Event report
Tab activated Command ID
Command name
Event verb
Contextual tab activated Command ID
Command name
Event verb
Application Menu opened Event verb
Application Menu closed Event verb
Menu (regular or gallery) opened Command ID
Command name
Event verb
Note: QAT menu events are not exposed.
Menu (regular or gallery) closed Command ID
Command name
Event verb
Note: QAT menu events are not exposed.
Command Command ID
Command name
Event verb
One of the following event locations:
- RIBBON
- QUICKACCESSTOOLBAR
- APPLICATIONMENU
- CONTEXTPOPUP
Parent Command ID
Parent Command name
One of the following invoke methods:
- CLICK
- KEYTIP
- KEYBOARD
- TOUCH
Note: Item galleries and combo boxes include the selected item index but do not include string and integer values. Spinners do not include the integer value.
Ribbon minimized Event verb
Ribbon expanded (expand button clicked or tap pinned) Event verb
Application mode switched Event verb
Mode ID (value set through SetModes)
Note: The application is responsible for unpacking this integer to determine which modes were set.
Tooltip displayed Event verb
Parent Command ID
Parent Command name

Windows Ribbon Framework Developer Guides

Declaring Commands and Controls with Ribbon Markup

Ribbon User Experience Guidelines

Ribbon Design Process