[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Assembly: Microsoft.Office.Tools.Common (in Microsoft.Office.Tools.Common.dll)
This property can be set at run time only under certain conditions. For more information, see Ribbon Object Model Overview.
The property identifies an image that is displayed by the control. The Office application retrieves this image from your solution only once, to improve performance. This property can be set only at design time, because the image it identifies is loaded during the LoadImage event. LoadImage is raised only once per image name, when the Ribbon is displayed. After that, the control image cannot be changed by using this property.
To load the image, add code to the LoadImage event handler. Check the ImageName property of the RibbonLoadImageEventArgs and set the Image property of the RibbonLoadImageEventArgs object to the image that you want to load.
This property is ignored if either the Image property or the OfficeImageId property is set. Images identified by the property can be loaded slightly faster than images identified by the Image property, because the Office application retrieves the image from your solution only the first time the Ribbon is displayed.
The ShowImage property must be true for the control to display the image. When you set the property at design time, Visual Studio automatically sets the ShowImage property to true. If you set the property at run time, you must set the ShowImage property to true in your code.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.