System.Windows.Forms.MenuItem.MeasureItem Event

Occurs when the menu needs to know the size of a menu item before drawing it.

Syntax

public event MeasureItemEventHandler MeasureItem

Remarks

In order for this event to be raised, you must have the MenuItem.OwnerDraw property of the menu item set to true. This event is raised before owner drawn menus are drawn to allow for the size of the menu item to be drawn to be specified. 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