System.Windows.Forms.ControlPaint.DrawMenuGlyph Method

Draws the specified menu glyph on a menu item control with the specified bounds and on the specified surface.

Syntax

public static void DrawMenuGlyph (System.Drawing.Graphics graphics, int x, int y, int width, int height, MenuGlyph glyph)

Parameters

graphics
The System.Drawing.Graphics to draw on.
x
The x-coordinate of the upper left corner of the drawing rectangle.
y
The y-coordinate of the upper left corner of the drawing rectangle.
width
The width of the menu glyph.
height
The height of the menu glyph.
glyph
One of the System.Windows.Forms.MenuGlyph values that specifies the image to draw.

Remarks

When owner-drawing System.Windows.Forms.MenuItem controls, you need to verify property values to determine the correct glyph to draw or remove. For example, when the MenuItem.Checked property is set to true, you call the MenuGlyph.Checkmark value of System.Windows.Forms.MenuGlyph to draw a check mark on the System.Windows.Forms.MenuItem.

Requirements

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