System.Windows.Forms.ToolStripRenderer.DrawButtonBackground Method

Draws the background for a System.Windows.Forms.ToolStripButton.

Syntax

public void DrawButtonBackground (ToolStripItemRenderEventArgs e)

Parameters

e
The System.Windows.Forms.ToolStripItemRenderEventArgs that contains data to draw the button's background.

Remarks

The ToolStripRenderer.DrawButtonBackground(ToolStripItemRenderEventArgs) method provides an entry point to the rendering code for the background of a System.Windows.Forms.ToolStripButton. Use this method to draw the background of a button when overriding the ToolStripItem.OnPaint(PaintEventArgs) method, or to force the background of a button to be drawn in a custom System.Windows.Forms.ToolStripRenderer. To change the way the background is rendered, override the ToolStripRenderer.OnRenderButtonBackground(ToolStripItemRenderEventArgs) 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