Compartilhar via


RibbonButton.ShowImage Property

Gets or sets a value that indicates whether the image that is associated with the button is visible.

Namespace:  Microsoft.Office.Tools.Ribbon
Assembly:  Microsoft.Office.Tools.Common (in Microsoft.Office.Tools.Common.dll)

Syntax

'Declaration
Property ShowImage As Boolean
bool ShowImage { get; set; }

Property Value

Type: System.Boolean
true if the image that is associated with the button is visible; otherwise, false. The default is false.

Remarks

This property is automatically set to true if you set the Image, ImageName, or OfficeImageId property in the Ribbon Designer. You can set it to false to cause the image associated with this control to be hidden.

Setting the Image, ImageName, or OfficeImageId property at run time does not change the value of the ShowImage property.

This property has no effect for instances of this button that are displayed on the Quick Access Toolbar.

If the ControlSize property is set to Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge, the button behaves as if ShowImage is always true.

.NET Framework Security

See Also

Reference

RibbonButton Interface

Microsoft.Office.Tools.Ribbon Namespace

Other Resources

Ribbon Object Model Overview