System.Windows.Forms.MenuItem.DrawItem Event

Occurs when the MenuItem.OwnerDraw property of a menu item is set to true and a request is made to draw the menu item.

Syntax

public event DrawItemEventHandler DrawItem

Remarks

The System.Windows.Forms.DrawItemEventArgs argument passed to a MenuItem.DrawItem event handler provides a System.Drawing.Graphics object that enables you to perform drawing and other graphical operations on the surface of the menu item. You can use this event handler to create custom menus that meet the needs of your application. For more information about handling events, see Consuming Events.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0