Provides data for the LoadImage event.
Assembly: Microsoft.Office.Tools.Common (in Microsoft.Office.Tools.Common.dll)
Handle the LoadImage event if you want to load an image that is identified by the ImageName property of a control. The Microsoft Office application retrieves this image from your solution only once, when the Ribbon is displayed, to improve performance. After that, the control image cannot be changed.
To load an image for a control, add code to the LoadImage event handler. If the ImageName property of the matches the ImageName property of the control, set the Image property to the image that you want to load.
The following example caches the images for two RibbonButton controls.
To run this code example, you must first perform the following steps:
Add a Ribbon (Visual Designer) item to an Office project.
Add a group to the custom tab.
Add two buttons to the group.
Add two images to the project resources.