ToolStripRenderer.DrawToolStripBackground(ToolStripRenderEventArgs) 方法

定义

绘制 ToolStrip 的背景。Draws the background for a ToolStrip.

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

参数

e
ToolStripRenderEventArgs

一个 ToolStripRenderEventArgs,其中包含用于绘制 ToolStrip 背景的数据。A ToolStripRenderEventArgs that contains the data to draw the background for the ToolStrip.

注解

DrawToolStripBackground 方法提供 ToolStrip背景的呈现代码的入口点。The DrawToolStripBackground method provides the entry point to the rendering code for the background of a ToolStrip. 使用此方法可在重写 ToolStrip.OnPaintBackground 方法时绘制 ToolStrip 的背景,或强制在自定义 ToolStripRenderer中绘制 ToolStrip 的背景。Use this method to draw the background of a ToolStrip when overriding the ToolStrip.OnPaintBackground method, or to force the background of a ToolStrip to be drawn in a custom ToolStripRenderer. 若要更改 ToolStrip 的背景的呈现方式,请重写从 ToolStripRenderer派生的类中的 OnRenderToolStripBackground 方法。To change the way the background of a ToolStrip is rendered, override the OnRenderToolStripBackground method in a class derived from ToolStripRenderer.

适用于