Share via


Overview of the IRibbonUI Object

Outlook Developer Reference

Use the IRibbonUI object to invalidate controls and update their content in an Outlook inspector. An add-in specifies callback methods in the Ribbon XML that IRibbonExtensibility.GetCustomUI returns. These methods handle events for custom controls. When Outlook calls one of these methods, it passes an IRibbonUI object as a parameter to the callback method. The IRibbonUI object is scoped such that the add-in can only invalidate its own controls using the object. The add-in cannot invalidate the controls created by another add-in.

IRibbonUI exposes the following methods:

Method Action Description
Invalidate() callback Marks all of the custom controls in your add-in for update.
InvalidateControl(string controlID) callback Marks a specific control defined by controlID in your add-in for update.

For performance reasons, a best practice when using the IRibbonUI object is to call InvalidateControl rather than Invalidate. If you call Invalidate, all Ribbon controls defined by your add-in are invalidated and callbacks will occur on open Inspectors.