[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Gets or sets the image to display on the control, if you want to use a built-in Microsoft Office icon.
Assembly: Microsoft.Office.Tools.Common (in Microsoft.Office.Tools.Common.dll)
The property identifies an Office icon that is displayed by the control. The property value is a string that identifies the imageMso value of the selected icon. This property can be set at design time or at run time. If you update this property at run time, the control's appearance is updated to reflect the change.
For a list of imageMso values, see the Microsoft Download Center page Office 2010 Add-In: Icons Gallery.
This property is ignored if the Image property is set. Images identified by the property can be loaded slightly faster than images identified by the Image property, because the images are cached in the Office application.
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.
The following example assigns Microsoft Office icons to two items in a gallery control.
To run this code example, you must first perform the following steps:
Add a Ribbon (Visual Designer) item to a project created by using Office project templates in Visual Studio.
Add a group to the custom tab.
Add a gallery to the group.
- 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.