This example demonstrates a possible way of implementing the "Add to Favorites" functionality.
Possible scenario
We are developing a chat application using DevExpress RibbonControl. Like in the majority of such applications, we have a list of "Favorite" contacts. So, we would like to have the capability to click on the contact's glyph to add a contact to the list or remove this contact from the list if the list already contains it.
Steps to implement
1. Implement the IMessageFilter interface to catch mouse move messages in order to show a tool tip after some time interval has elapsed.
2. Implement some functionality which will allow us to know whether or not Cursor is above the the contact's glyph and also to correctly determine a tool tip location. In this example, an approach described in the BarButtonItem: handling click on image ticket is used for this purpose.
3. Handle the ItemClick event for all bar items in the contacts list and design a method (methods) which will add the clicked item to the "Favorites" list if Cursor is above the bar item's glyph or remove the item if the "Favorites" list already contains it.