ToolStripRenderer.DrawItemImage(ToolStripItemImageRenderEventArgs) ToolStripRenderer.DrawItemImage(ToolStripItemImageRenderEventArgs) ToolStripRenderer.DrawItemImage(ToolStripItemImageRenderEventArgs) ToolStripRenderer.DrawItemImage(ToolStripItemImageRenderEventArgs) Method

定义

ToolStripItem 上绘制一个图像。Draws an image on a ToolStripItem.

public:
 void DrawItemImage(System::Windows::Forms::ToolStripItemImageRenderEventArgs ^ e);
public void DrawItemImage (System.Windows.Forms.ToolStripItemImageRenderEventArgs e);
member this.DrawItemImage : System.Windows.Forms.ToolStripItemImageRenderEventArgs -> unit
Public Sub DrawItemImage (e As ToolStripItemImageRenderEventArgs)

参数

注解

DrawItemImage方法提供图像的呈现代码的入口点。The DrawItemImage method provides the entry point to the rendering code for an image. 当重写ToolStripItem.OnPaint方法或强制在自定义ToolStripRenderer中绘制图像时, 使用此方法绘制图像。Use this method to draw an image when overriding the ToolStripItem.OnPaint method or to force the image to be drawn in a custom ToolStripRenderer. 若要更改图像的呈现方式, 请重写OnDrawItem派生自ToolStripRenderer的类中的方法。To change the way the image is rendered, override the OnDrawItem method in a class derived from ToolStripRenderer.

适用于