Skybound Rebar

RebarMenuExtender.SetImage Method 

Sets the image associated with a menu item.

[Visual Basic]
Public Sub SetImage( _
   ByVal menuItem As MenuItem, _
   ByVal image As Image _
)
[C#]
public void SetImage(
   MenuItem menuItem,
   Image image
);

Parameters

menuItem
The menu item to associate the image with.
image
The image to associate with the menu item.

Remarks

Note that no image is actually displayed on the menu unless it its containing ContextMenu has been assigned a popup theme, or the ContextMenu is being displayed by a rebar control.

If you create a RebarMenuItemRenderer in order to owner-draw a menu item, the Image property of the renderer will contain the image assigned by this method.

See Also

RebarMenuExtender Class | Skybound.Rebar Namespace