System.Windows.Forms.ToolStripRenderer.DrawImageMargin Method

Draws the space around an image on a System.Windows.Forms.ToolStrip.

Syntax

public void DrawImageMargin (ToolStripRenderEventArgs e)

Parameters

e
A System.Windows.Forms.ToolStripRenderEventArgs that contains the data to draw the space around the image.

Remarks

The ToolStripRenderer.DrawImageMargin(ToolStripRenderEventArgs) method provides the entry point to the rendering code for the image. Use this method to draw the image margin when overriding the ToolStripItem.OnPaint(PaintEventArgs) method, or to force the image margin to be drawn in a custom System.Windows.Forms.ToolStripRenderer. To change the way the image margin is rendered, override the ToolStripRenderer.OnRenderImageMargin(ToolStripRenderEventArgs) method in a class derived from System.Windows.Forms.ToolStripRenderer.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0