Udostępnij za pośrednictwem


RibbonSplitButton.ImageName Property (2007 System)

Gets or sets the name that you can use in the E:Microsoft.Office.Tools.Ribbon.LoadImage event handler to identify an image for the control.

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

Syntax

'Declaration
Public Property ImageName As String
'Usage
Dim instance As RibbonSplitButton 
Dim value As String 

value = instance.ImageName

instance.ImageName = value
public string ImageName { get; set; }
public:
property String^ ImageName {
    String^ get ();
    void set (String^ value);
}
public function get ImageName () : String 
public function set ImageName (value : String)

Property Value

Type: System.String
A string that you can use in the E:Microsoft.Office.Tools.Ribbon.OfficeRibbon.LoadImage event handler to identify an image for the control.

Remarks

The ImageName 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 ImageName 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.

.NET Framework Security

See Also

Reference

RibbonSplitButton Class

RibbonSplitButton Members

Microsoft.Office.Tools.Ribbon Namespace

Other Resources

Ribbon Object Model Overview